Sponsored Content
Top Forums Programming Problem on capturing system Shutdown Post 302847739 by Corona688 on Tuesday 27th of August 2013 04:26:59 PM
Old 08-27-2013
Quote:
Originally Posted by hakermania
And one last thing: If my disk is not writable when I receive the signal, how the heck am I going to do my cleanup? How are other linux applications do stuff like this?
It may be getting proper cleanup, I'm not sure. Daemons definitely do, I'm not so sure of random user processes that happen to be sitting around.

My suggestion would be to try the suggestion I made earlier, unlinking the file...
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Capturing Oracle Shutdown error

Hi, Iam calling 3 sql scripts through one shell script 'rmia.sh'. Till now this was working fine, but last time while calling the SQL scripts, Oracle was down. But amazingly the exit status was '0' (success)!!! Below is the shell code: #!/usr/bin/ksh -x assign_file asql a.sql 1... (15 Replies)
Discussion started by: ganapati
15 Replies

2. Shell Programming and Scripting

Shutdown a system by MAC?

Ok here is the problem we have 2 v440 with same IP address running solars 9. one remains on the other remains off. They are both configured exactly the same for redundant purposes for the software we use. This was the best/worst idea. Great because down time is only a mere minutes. The bad is the... (7 Replies)
Discussion started by: deaconf19
7 Replies

3. Solaris

logs for system shutdown

I am working on a SUN T2000 machine with Solaris 10 running on it. When I checked the system this morning, I found it to be turned off. The lastreboot command showed that the system had been shut down the previous night. I want to find out how the system was shut down. I have run hardware health... (2 Replies)
Discussion started by: batman727
2 Replies

4. Shell Programming and Scripting

Sending mail on system shutdown

I want to only send a mail before my system goes for a shutdown or reboot. I don't want a mail when it comes up after a reboot or is normally started.. How can i achieve this? (2 Replies)
Discussion started by: proactiveaditya
2 Replies

5. Windows & DOS: Issues & Discussions

system restarts after shutdown!!

Hello, from last few days my laptop is not whutting down properly.. when ever i ty to shutdown it restarts again.. what may be problem?? antivirus is updated till date.. and i use windows xp sp2.... regards, deepak. (5 Replies)
Discussion started by: smarty86
5 Replies

6. Shell Programming and Scripting

Capturing awk's system(cmd) output

Hi everybody, I am working on a bigger awk script in which one part is comparing the size of two files. I want to evaluate which file is bigger and then just save the bigger one. I got it all working except for the part where I want to figure out which file is bigger; the one awk is currently... (2 Replies)
Discussion started by: iMeal
2 Replies

7. Solaris

Shutdown system option

I am working on sunos solaris. I want to know which is good for system shut-down ? (3 Replies)
Discussion started by: Jitesh Varshney
3 Replies

8. Red Hat

shutdown system/myeclipse

Hi All, I have one situation to shut-down the system through shell script.I need script command to shut-down the system and process should end(safe-mode) the MyEclipse. (0 Replies)
Discussion started by: stsivaraj
0 Replies
pthread_cleanup_pop(3T) 												   pthread_cleanup_pop(3T)

NAME
pthread_cleanup_pop(), pthread_cleanup_push() - remove or register a cancellation cleanup handler SYNOPSIS
PARAMETERS
routine Routine registered as a cancellation cleanup handler. arg Parameter to be passed to the cancellation cleanup handler execute Indicates if the popped cancellation cleanup handler is to be executed. DESCRIPTION
installs the cancellation cleanup handler routine onto the calling thread's cancellation cleanup stack. This handler will be popped from the calling thread's cancellation cleanup stack and called with the arg parameter when any of the following occur: (a) the thread calls or returns from its start routine. (b) the thread acts upon a cancellation request. (c) the thread calls with a non-zero execute argument. When a thread terminates, it will execute each of the cancellation cleanup handlers on its cancellation cleanup stack. These handlers will be popped and executed in the reverse order that they were installed ( removes the cancellation cleanup handler at the top of the calling thread's cancellation stack. If execute is non-zero, the cancellation cleanup handler is called after it is removed from the cancellation stack. If execute is zero, the cancellation cleanup handler is simply removed and will not be called. and must appear as statements and in pairs within the same lexical scope. These functions may be macros which contain the opening '{' in the push function and the closing '}' in the pop function. Calling or is undefined if there have been any calls to or made without the matching call since the jump buffer was filled. Calling or from inside a cancellation cleanup handler results in undefined behavior unless the corresponding or was also done inside the cancellation cleanup handler. RETURN VALUE
The and functions must be used as statements. They do not have return values or errors. ERRORS
None. WARNINGS
The functions and must be called in the same lexical scope or the result is undefined behavior. AUTHOR
and were derived from the IEEE POSIX P1003.1c standard. SEE ALSO
pthread_cancel(3T), pthread_setcancelstate(3T). STANDARDS CONFORMANCE
Pthread Library pthread_cleanup_pop(3T)
All times are GMT -4. The time now is 02:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy