Re: Background Tasks
Posted in 1995
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
CRAIG@CHEMISTRY.CHEM.UTAH.EDU writes: > What flavor of Unix and what shell are you using? You're probably >just missing the "nohup" command which will intercept the SIGTERM(?) >signal sent as you log off. For example: > nohup your_pgm 1>/dev/null 2>/dev/null & > --Craig (craig@chemistry.utah.edu) >> >> I have a program that uses embedded sql commans and need to >> run it as a background task. This is in C/UNIX. Now I know how to >> run a background task but I can't keep this running after I log off. >> I have other non INFORMIX processes running in this mode and there >> is no problem with them. If any one can help I thank them in advance. >> An alternative to nohupping your program is to simply catch and ignore the SIGHUP signal received when you log off. #include <signal.h> main() { signal(SIGHUP,SIG_IGNORE); // these are preprocessor defines in signal.h ... }