05-12-2005
Inter Process File Handling Problem
Hi All,
i am running a oracle procedure which writes a file . The same file is picked up by another script which runs in a cron after every 5 minutes.
Now the problem is that sometimes my script picks up a file while the procedure is still writing data in the file.
is there is any way i can lock my file, so that no other process process a file while one is still processin the file.
Thanx in advance
Saurabh
9 More Discussions You Might Find Interesting
1. Programming
unix IPC
i would like to know the method of usage of semaphores on shared memory segments the topic seems very difficult to understand mainly when difrent proceses communicate instantly and how do i avaoid deadlock situation (2 Replies)
Discussion started by: kamathanil
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am opening a file......then i am wrting some data into it......and i am reopening the file again but ......i get a error cannot open file.......
$::file= "\adder\testfile.txt"
open(TEST1,$::file);
some write operation
close(TEST1)
open(TEST1,$::file) 'I GET A ERROR CAN OPEN... (2 Replies)
Discussion started by: vivekshankar
2 Replies
3. Programming
hi
i m writin a program in which i keep track of all the child processes the program has generated and if a child process has an abnormal termination i need to do certain task related to that child process.
for handlin child process i used waitpid:
temp_cpid=waitpid(-1,&stat,WUNTRACED);
... (4 Replies)
Discussion started by: mridula
4 Replies
4. UNIX for Advanced & Expert Users
Hi,
I am thinking about writing a log daemon for a multi-processed ksh application (yes - I know that high-level language would be a better option).
My question is as follows:
If many processes (many scripts) will try writing to a single log file:
print "message" > common.log
Will it work or... (2 Replies)
Discussion started by: adderek
2 Replies
5. Programming
For a program I am designing, which involves handling the keyboard input Ctrl^c (SIGINT), it is taking ages for the program to actually recognise and perform the corresponding action whenever I run it and hit Ctrl^C at the CL. I have to do at least 3 Ctrl^Cs before the program will actually... (3 Replies)
Discussion started by: JamesGoh
3 Replies
6. Programming
i want to write a C chat program that communicates over IPC(inter process communication), that could be run using 2 seperate terminal windows within the same computer. so that wat u type in one terminal window , should appear on the other and vice versa...
could some one please help me with the... (2 Replies)
Discussion started by: localp
2 Replies
7. Programming
i wrote handler for sigsegv such that i can allocate memory for a variable to which
sigsegv generated for illlegal acces of memory.
my code is
#include <signal.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
char *j;
void segv_handler(int dummy)
{
j=(char *)malloc(10);
... (4 Replies)
Discussion started by: pavan6754
4 Replies
8. Programming
I need help!Many Thanks!
Now,I try to manage the shared memory inter-process .
Inevitably,I have to deal with the synchronous.
I know the pthread_rwlock in posix,and I compile ,then run successfully in Red Hat Enterprise 4.
I have a doubt about whether the Posix supports the system such as... (1 Reply)
Discussion started by: weizh
1 Replies
9. UNIX for Beginners Questions & Answers
In solaris, orphan process is put to sleep mode and does not consume any CPU resources. In Linux, orphan process is kept in running state consuming all CPU and Ram resources. Is it the case? Is there a difference on how these operating systems will handle orphan processes?
The route cause of... (10 Replies)
Discussion started by: Belure Pooja B
10 Replies
ATD(8) System Manager's Manual ATD(8)
NAME
atd - run jobs queued for later execution
SYNOPSIS
atd [-l load_avg] [-b batch_interval] [-d] [-f] [-s]
DESCRIPTION
atd runs jobs queued by at(1).
OPTIONS
-l Specifies a limiting load factor, over which batch jobs should not be run, instead of the compile-time choice of 1.5. For an SMP
system with n CPUs, you will probably want to set this higher than n-1.
-b Specify the minimum interval in seconds between the start of two batch jobs (60 default).
-d Debug; print error messages to standard error instead of using syslog(3). This option also implies -f.
-f Run atd in the foreground.
-s Process the at/batch queue only once. This is primarily of use for compatibility with old versions of at; atd -s is equivalent to
the old atrun command. A script invoking atd -s is installed as /usr/sbin/atrun for backward compatibility.
WARNING
atd won't work if its spool directory is mounted via NFS even if no_root_squash is set.
FILES
/var/spool/cron/atjobs The directory for storing jobs; this should be mode 700, owner daemon.
/var/spool/cron/atspool The directory for storing output; this should be mode 700, owner daemon.
/etc/at.allow, /etc/at.deny determine who can use the at system.
SEE ALSO
at(1), atrun(1), cron(8), crontab(1), syslog(3), at.deny(5), at.allow(5).
BUGS
The functionality of atd should be merged into cron(8).
2009-11-14 ATD(8)