Writing to A NON-Existing File in \"C\"

Matt Landau mlandau at bbn.com
Fri Apr 8 07:28:51 AEST 1988


In comp.unix.wizards (<12860 at brl-adm.ARPA>), drears at ardec.arpa (Dennis G. Rears 
(FSAC)) writes:
>Here is sample code that will allow you to do this. It will exit
>if it can't open for appending any file.  If it can not stat the
>file it assumes it doesn't exist.  You can be fancy and check errno
>though.

>#define NULL	  "/dev/null/"

Probably want to pick another name for /dev/null, tho... :-)
--
 Matt Landau		    The happiest cold and lonely guy 
 mlandau at bbn.com	          stuck in the Yukon without a dog.



More information about the Comp.unix.wizards mailing list