[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
OT: open syscall wrapper - is this bug free ?
- To: misc@openbsd.org
- Subject: OT: open syscall wrapper - is this bug free ?
- From: "Gustavo V. G. C. Rios" <gustavo.rios@terra.com.br>
- Date: Wed, 25 Feb 2004 21:04:22 +0000
- Organization: Alstom Transport Information Solutions
Hi folks.
Sorry for this OT, but this list is the closer i get!
I am in need for writing an open syscall wrapper. Since i do not want to
deal with stdargs my approach went like this:
#include <fcntl.h>
int
apx_open(const char *path, int flags, mode_t mode)
{
return flags & CREAT ? open(path, flags, mode) : open(path, flags);
}
/* Prototype */
extern int apx_open(const char *, int, ...);
I wonder if this is perfectly correct? I mean, should i face side
effects or this is bug free?
Thanks for your time and cooperation.
best regards