bruce@bnr-vpa.UUCP (12/04/87)
The /usr/include/fcntl.h file on HP9000 Series 500 HP-UX version
5.2 includes the following two lines:
#define F_SETLK 6 /* Set file lock */
#define F_RDLCK 01
which to the file inews.c implies that file locking using fcntl() exists
(at line 143 in inews.c patch 13):
# if defined(F_RDLCK) && defined(F_SETLK)
news_lock.l_type = F_RDLCK;
if (fcntl(fileno(actfp), F_SETLK, &news_lock) < 0) {
whereas in fact it is not supported in that release. The HP-UX man
page indicates that F_GETLK, F_SETLK, F_SETLKW are not supported on
series 200 and 500 machines. This causes inews.c to exit thusly:
inews: Can't lock /usr/lib/news/active: Invalid argument
which drops a lot of news on the floor! My fix was to comment out the
appropriate defines in the system's /usr/include/fcntl.h file, but
a better fix would be have an additional option to LOCKF, which
would specify the use of fcntl() over lockf().
--
Bruce Townsend (bnr-vpa!bruce) Phone: (613) 726-3008
Bell-Northern Research Usenet: {utzoo, utcs}!bnr-vpa!bruce
P.O. Box 3511, Station C, Ottawa, Ontario, Canada, K1Y 4H7