Hylafax Developers Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[hylafax-devel] Re: Fwd: File open patch (fwd)
On Sun, 19 Mar 2000, Robert Colquhoun wrote:
> At 06:39 PM 3/18/00 -0800, Tim Rice wrote:
> >This patch doesn't work.
> >-----
> ># pwd
> >/var/spool/fax
> ># ls -l */seqf
> >UX:ls: ERROR: Cannot access */seqf: No such file or directory
> >#
> >-----
> >tim(trr)@uw71 1% sendfax -d 555.1212 x
> >553 Unable to open sequence number file docq/seqf; No such file or directory.
> >tim(trr)@uw71 2%
>
> Are you sure you restarted hfaxd?
Yes.
>
> Attached is a slightly modified patch, could you try that.
No improvement.
...
sendfax -d 555.1212 x
553 Unable to open sequence number file docq/seqf; No such file or directory.
...
I dug a little deeper this time.
Looking at your patch
....
int rtn = lstat(filename, &sb);
if (rtn == ENOENT) {
fd = Sys::open(filename, O_CREAT | O_RDWR | O_EXCL, 0600);
} else if (rtn == 0 && S_ISREG(sb.st_mode)) {
...
And looking ath the man page for lstat
...
Return values
On success, stat, lstat, fstat, stat64, lstat64, and fstat64 return 0.
On failure, they return -1 and set errno to identify the error.
...
>
> - Robert
>
--
Tim Rice Multitalents (707) 874-1130 (voice)
tim@trr.metro.net
____________________ HylaFAX(tm) Developers Mailing List ____________________
To unsub: mail -s unsubscribe hylafax-devel-request@hylafax.org < /dev/null