Sponsored Content
Full Discussion: Restartable scripts
Top Forums Shell Programming and Scripting Restartable scripts Post 302287972 by linusleoj on Monday 16th of February 2009 06:05:48 AM
Old 02-16-2009
Thanks pludi
I am using sql loader in unix and inserting data to the database. and i have no idea as to how to make the script restart able.
an example would help a lot
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with scripts

script that ask for "enter a file name" and removes that file and asks for confirmation before deletion if executed the output might look as enter the filename you intent to deleted remover file? Y file deleterd I knwo the comand I would use find . -name *.* -ok rm {}\; I guess... can... (1 Reply)
Discussion started by: LiTo
1 Replies

2. Shell Programming and Scripting

Calling expect scripts from other expect scripts

Hi, First, let me explain the issue I am trying to solve. We have a lot of expect scripts with the duplicated send/expect commands. So, I'd like to be able to extract the duplicated code into the common scripts that can be used by other scripts. Below is my test where I am trying to call... (0 Replies)
Discussion started by: seva
0 Replies

3. UNIX for Dummies Questions & Answers

Profile scripts versus rc scripts....

what is the difference between login and profile scripts versus the rc scripts? (1 Reply)
Discussion started by: rookie22
1 Replies

4. Shell Programming and Scripting

Help with Script using rsh and scripts within scripts

Hi, I've written a script that runs on a Database server. It has to shutdown the Application server, do an Oracle Dump and then restart the Application server. Its been a long time since I wrote any shells scripts. Can you tell me if the scripts that I execute within my script will be executed... (3 Replies)
Discussion started by: brockwile1
3 Replies

5. Shell Programming and Scripting

Running scripts within scripts from cron

Hi all, I have set up a cron job which calls another shell script shell script which in turn calls a Java process. The cron tab looks so. 0,30 7-18 * * 1-5 /u01/home/weblogic/brp/bin/checkstatus.sh >> /u01/home/weblogic/logs/checkstatus.log The checkstatus.sh scripts looks like this. ... (4 Replies)
Discussion started by: sirbrian
4 Replies

6. Shell Programming and Scripting

Changing the Bash Scripts to Bourne Scripts:URGENT

Hi, I have to write a program to compute the checksums of files ./script.sh I wrote the program using bash and it took me forever since I am a beginner but it works very well. I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies

7. Shell Programming and Scripting

KSH - How to call different scripts from master scripts based on a column in an Oracle table

Dear Members, I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc. I would like to create a script which will will call other scripts based on the request action. Can we directly read from the REQUEST_ACTION... (2 Replies)
Discussion started by: Yoodit
2 Replies

8. Shell Programming and Scripting

Calling scripts from with scripts

Hi all, I'm wondering if you could give me some advice. I am new to scripting and am getting rather frustrated that i can get my script to call another script if certain criteria is met, via command line, but I cannot get the same script to work thru the cron jobs. My first script monitors... (8 Replies)
Discussion started by: echoes
8 Replies

9. Shell Programming and Scripting

Calling multiple scripts from another scripts

Dear all, I am working on script which call other shell scripts in a loop but problem is from second script am not able to come out. Here is the snippet:- #!/bin/bash HSFILE=/root/Test/Components.txt LOGFile=/opt/domain/AdminDomain/application/logs... (3 Replies)
Discussion started by: sharsour
3 Replies
RASCTL(2)						      BSD System Calls Manual							 RASCTL(2)

NAME
rasctl -- restartable atomic sequences LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <sys/ras.h> int rasctl(void *addr, size_t len, int op); DESCRIPTION
Restartable atomic sequences are code sequences which are guaranteed to execute without preemption. This property is assured by the kernel by re-executing a preempted sequence from the start. This functionality enables applications to build atomic sequences which, when executed to completion, will have executed atomically. Restartable atomic sequences are intended to be used on systems that do not have hardware sup- port for low-overhead atomic primitives. The rasctl function manipulates a process's set of restartable atomic sequences. If a restartable atomic sequence is registered and the process is preempted within the range addr and addr+len, then the process is resumed at addr. As the process execution can be rolled-back, the code in the sequence should have no side effects other than a final store at addr+len-1. The kernel does not guarantee that the sequences are successfully restartable. It assumes that the application knows what it is doing. Restartable atomic sequences should adhere to the following guidelines: o have a single entry point and a single exit point; o not execute emulated instructions; and o not invoke any functions or system calls. Restartable atomic sequences are inherited from the parent by the child during the fork(2) operation. Restartable atomic sequences for a process are removed during exec(3). The operations that can be applied to a restartable atomic sequence are specified by the op argument. Possible operations are: RAS_INSTALL Install this sequence. RAS_PURGE Remove the specified registered sequence for this process. RAS_PURGE_ALL Remove all registered sequences for this process. The RAS_PURGE and RAS_PURGE_ALL operations should be considered to have undefined behaviour if there are any other runnable threads in the address space which might be executing within the restartable atomic sequence(s) at the time of the purge. The caller must be responsible for ensuring that there is some form of coordination with other threads to prevent unexpected behaviour. To preserve the atomicity of sequences, the kernel attempts to protect the sequences from alteration by the ptrace(2) facility. RETURN VALUES
Upon successful completion, rasctl() returns zero. Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
The rasctl function will fail if: [EINVAL] Invalid input was supplied, such as an invalid operation, an invalid address, or an invalid length. A process may have a finite number of atomic sequences that is defined at compile time. [EOPNOTSUPP] Restartable atomic sequences are not supported by the kernel. [ESRCH] Restartable atomic sequence not registered. SEE ALSO
ptrace(2) HISTORY
The rasctl functionality first appeared in NetBSD 2.0 based on a similar interface that appeared in Mach 2.5. CAVEATS
Modern compilers reorder instruction sequences to optimize speed. The start address and size of a RAS need to be protected against this. One level of protection is created by compiler dependent instructions, abstracted from user level code via the following macros: RAS_DECL(name) Declares the start and end labels used internally by the other macros to mark a RAS. The name uniquely identifies the RAS. RAS_START(name) Marks the start of the code. Each restart returns to the instruction following this macro. RAS_END(name) Marks the end of the restartable code. RAS_ADDR(name) Returns the start address of a RAS and is used to create the first argument to rasctl. RAS_SIZE(name) Returns the size of a RAS and is used as second argument to rasctl. Recent versions of gcc(1) require the -fno-reorder-blocks flag to prevent blocks of code wrapped with RAS_START/RAS_END being moved outside these labels. However, be aware that this may not always be sufficient to prevent gcc(1) from generating non-restartable code within the RAS due to register clobbers. It is, therefore, strongly recommended that restartable atomic sequences are coded in assembly. RAS blocks within assembly code can be specified by using the following macros: RAS_START_ASM(name) Similar to RAS_START but for use in assembly source code. RAS_END_ASM(name) Similar to RAS_END but for use in assembly source code. RAS_START_ASM_HIDDEN(name) Similar to RAS_START_ASM except that the symbol will not be placed in the dynamic symbol table. RAS_END_ASM_HIDDEN(name) Similar to RAS_END_ASM except that the symbol will not be placed in the dynamic symbol table. BSD
April 29, 2008 BSD
All times are GMT -4. The time now is 09:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy