Re: Problem with system()
Re: Problem with system()
- Subject: Re: Problem with system()
- From: "chas williams - CONTRACTOR" <email@hidden>
- Date: Fri, 06 Jul 2007 15:08:17 -0400
In message <email@hidden>,Nor
m Green writes:
> int rc = system("date >/usr/tmp/tmp.kPCvVa");
>
>If fails with rc == 256 and errno == 0 and prints this to stderr:
>
>sh: line 1: 1: Bad file descriptor
>
>I know the path is OK because the file /usr/tmp/tmp.kPCvVa *IS* created, but
>it has a size of zero.
the shell handles the redirection and creates the output file so its
not really an indicator that your path is ok. its a bad idea to just
call 'date' and not give the full path since some user program called
date (and someone somwhere has probably done this) would interfere
with proper behavior.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden