Sponsored Content
Full Discussion: Restarting the program
Top Forums Programming Restarting the program Post 302587101 by vistastar on Wednesday 4th of January 2012 05:30:13 AM
Old 01-04-2012
Just sleep() your program, then wake up it when you need.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

restarting a while loop

I have a monitoring script that checks on the content of an alert file, I'm doing some checks on weather I have already reported on the alert (there is one alert per file). If I find that the content is the same as before how can I stop and restart the loop until there is differences bewteen the... (5 Replies)
Discussion started by: nhatch
5 Replies

2. UNIX for Dummies Questions & Answers

Restarting the Spooler

:confused: Everytime our UNIXWARE 7 Server is restarted we also have to restart the spooler. If the spooler is not restarted, print jobs get stuck in the queu. Once restarted by using the following command lpstop and lpstart everything works fine. Does anyone have any ideas what could be causing... (0 Replies)
Discussion started by: Yorgy
0 Replies

3. Solaris

cannot telnet after restarting server

Dear guys, Pls help me this case. I telnet normally to Solaris. After restarting it manually, I can only console, cannot telnet from my latop although I can ping it. I checked /etc/default/login /usr/sbin/in.telnetd /etc/inet/inetd.conf All these files are the same. I don't see telnet... (2 Replies)
Discussion started by: wipi
2 Replies

4. Solaris

server restarting

Hello people, My solaris server is rebooting, not sure how!!! Which log should I look in to? I checked /var/adm/messages and dmesg also. How do I check older dmesg logs? I checked lastlog and also ran the last command. Nothing useful pointing to why server rebooted. Also when server reboots I... (4 Replies)
Discussion started by: rcmrulzz
4 Replies

5. UNIX for Dummies Questions & Answers

restarting a webserver on hang

hi guys what is the common way to restart a webserver that got hung upon high load? i have a loop shell script running, checking for a small textfile on the webserver, in case it doesnt get that file within 5 seonds it kills the server and restarts it. i know its very crude, but i needed a... (4 Replies)
Discussion started by: scarfake
4 Replies

6. Solaris

Restarting syslogd on Unix

Hi All, I can seem to find the syslog daemon in the /etc/init.d/ dir. i have made change to the syslog.conf i need to restart the daemon. am using solaris 10. i have no problem on version 9 Anyone with a template i can use for log review for auditing purposes. (1 Reply)
Discussion started by: lottiem
1 Replies

7. Shell Programming and Scripting

Trapping SIGINT after restarting program.

Tried to add a function to my control_c interrupt here. It works but has one little bug. If the user selects to run the function instead of exiting, the program restarts itself without forking as it should. However, after that control_c no longer works again. I wanted to allow the user to run... (1 Reply)
Discussion started by: Azrael
1 Replies

8. UNIX for Dummies Questions & Answers

Restarting a process

Hi, How is it possible to restart only your process. I can get the process killed but I am not able to start it. For eg : i first did this ps -ef|grep _out --displays all the process with _out in the name then I killed kill -15 36044 -- process id. Now how can i start the same... (1 Reply)
Discussion started by: TH3M0Nk
1 Replies

9. Shell Programming and Scripting

Need help in restarting process

Hi friends, I have one unix command which is used to check the network status manually. followig is the command check_Network this command give follwoing status Network 1 is ok Network 2 is ok network 3 is ok network 4 is ok . . . . Network 10 is... (8 Replies)
Discussion started by: Nakul_sh
8 Replies

10. SuSE

Restarting syslog-ng

Environment: SUSE 10.3 I made a configuration change in '/etc/syslog-ng/syslog-ng.conf' file in a server. An article found on web says "After the change '/etc/init.d/syslog-ng' should be restarted". But there is no 'syslog-ng' in /etc/init.d directory. What is syslog-ng or a... (4 Replies)
Discussion started by: JDBA
4 Replies
shevek::closure(3)					     Library Functions Manual						shevek::closure(3)

NAME
shevek::closure - Block and resume without blocking the main loop. SYNOPSIS
#include <closure.hh> Inherits shevek::refbase. Public Member Functions bool empty () const Check if the closure is empty. void set_function (sigc::slot0< void > func, bool run=true, sigc::slot0< void > cb=sigc::slot0< void >()) Set running function on an empty closure. ~closure () Destructor. void wake () Continue running the closure. Static Public Member Functions static Glib::RefPtr< closure > create () Create a new closure. static void block () Sleep, returning control to the caller until awoken. Detailed Description Block and resume without blocking the main loop. Closures allow blocking and resuming the main loop. They are implemented with threads, which means that they don't work well with multi- threaded programs. If a function wants to be able to block using a closure, it must be called using closure(). It (or any function it calls) can then suspend by calling closure::block(). It can be awoken again by calling closure::wake() on the closure object. Member Function Documentation static void shevek::closure::block () [static] Sleep, returning control to the caller until awoken. This function puts the current closure to sleep. It will continue to run when awoken with wake(). It can also be destroyed. This function uses a global variable to know which is the current closure, so it can be called without an object, as closure::block (); . static Glib::RefPtr<closure> shevek::closure::create () [inline, static] Create a new closure. Create a new closure. It will be empty initially. bool shevek::closure::empty () const [inline] Check if the closure is empty. Check if the closure is empty. If it is, set_function() can be called. void shevek::closure::set_function (sigc::slot0< void >func, boolrun = true, sigc::slot0< void >cb = sigc::slot0< void >()) Set running function on an empty closure. Set running function. The closure must be empty when this is called. When the function exits, the closure returns to the empty state, and the callback is called, if given. void shevek::closure::wake () Continue running the closure. Wake a closure. It is an error to wake a closure which isn't blocking (in particular also the currently running closure). Author Generated automatically by Doxygen for libshevek from the source code. libshevek Fri May 11 2012 shevek::closure(3)
All times are GMT -4. The time now is 05:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy