Path: utzoo!utgpu!water!watmath!clyde!att!att-ih!pacbell!ames!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: Redirect Output in the Middle of a Program?? Message-ID: <11257@mimsy.UUCP> Date: 28 Apr 88 10:13:22 GMT References: <13085@brl-adm.ARPA> <3571@gryphon.CTS.COM> <2841@cvl.umd.edu> <62@denali.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 13 In article <62@denali.UUCP> karish@denali.UUCP (karish) writes: >... The user's program can catch the SIGHUP, using a signal handler >assigned by the signal() function. This handler can use fopen() to >open outfiles, and freopen() to reassign the output streams. This is quite dangerous. The proposed technique is likely to work until you need it to do so. A SIGHUP can occur while all sorts of internal states are inconsistent; opening a new stream, or reopening an existing one, is liable to result in a core dump or lost or duplicated output. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris