Subject: touch(1) enchancement, mkstemp(1)
To: None <current-users@NetBSD.ORG>
From: Darren Reed <darrenr@cyber.com.au>
List: current-users
Date: 02/10/1998 18:51:52
I'd like to propose an extension to touch(1) that returns information
about whether the file being touch'd actually existed prior to touch
being executed.  Something like an option causing it to return -1
if EEXIST when opening with O_EXCL|O_CREAT.

I'd also like to propose that a command line interface to mkstemp(3)
be implemented.  It would work something like this:

prog=`basename $0`
tmpfile=`mkstemp /tmp/${prog}.XXXXXX`

where tmpfile is the resulting filename (i.e. X's are changed to
something else).  mkstemp(1) would return 0 on success and 1 if
it failed to create a file.

Comments ?

darren