Thread View: comp.mail.mush
2 messages
2 total messages
Started by Bart Schaefer
Tue, 27 Oct 1992 19:17
Re: Strange things in mush (already patch#5 on SunOS4.1.2)
Author: Bart Schaefer
Date: Tue, 27 Oct 1992 19:17
Date: Tue, 27 Oct 1992 19:17
29 lines
1134 bytes
1134 bytes
On Oct 27, 8:16am, Bart Schaefer wrote:
} Subject: Re: Strange things in mush (already patch#5 on SunOS4.1.2)
}
} } The new xcreat() code has an off by one error which stops the lock
} } code from working
}
} Patch appended.
Oops. The ! line in this hunk:
} --- 170,176 ----
} }
} }
} off_intr();
} ! if (lockfd < 0) {
} if (cnt)
} print("done.\n");
} (void) close(lockfd);
} ***************
should of course read
if (lockfd > -1) {
Sorry about that ...
--
Bart Schaefer Vice President, Engineering
schaefer@z-code.com Z-Code Software Corporation
Re: Strange things in mush (already patch#5 on SunOS4.1.2)
Author: NUMATA Toshinori
Date: Fri, 30 Oct 1992 02:51
Date: Fri, 30 Oct 1992 02:51
27 lines
1376 bytes
1376 bytes
In article <9210271117.ZM22350@z-code.com> schaefer@z-code.z-code.com writes:
>} --- 170,176 ----
>} }
>} }
>} off_intr();
>} ! if (lockfd < 0) {
>} if (cnt)
>} print("done.\n");
>} (void) close(lockfd);
>} ***************
>should of course read
> if (lockfd > -1) {
The close() call in the "if" statement should also be deleted because
the value xcreat() returns (and assigned to lockfd) is 0, -1, or -2
depending on success or failure of the creation of lock file, and no
longer related to any file descriptors.
This code eventually closes file descriptor 0 (stdin) when a lock file
is created, and cause mush exit without getting into interactive mode.
--
NUMATA, Toshinori numa@sysrap.cs.fujitsu.co.jp or
postmaster@sysrap.cs.fujitsu.co.jp
Architecture Dept., Open Systems Group, FUJITSU LIMITED
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads