Re: [slackware-alphadevel] Bug report: fortune

From: Chris Lumens (chris@slackware.com)
Date: Sun Dec 03 2000 - 02:27:13 PST


> The 'fortune' program does not work correctly - it generates no output:
>
> root@odin:~# /usr/games/fortune
> root@odin:~#

Okay, it's been placed on the list of things to do.

> If I read the above correctly, it succeeds in opening
> /usr/games/lib/fortunes/fortunes.dat in read-only mode as filedescriptor
> 4 but then goes on to seek on descriptor 3 (stderr) - that seems like a
> strange thing to do. I'd expect it to seek to some random position on
> descriptor 4 to find the entry to display... Either some error occours
> that it attempts to log to stderr (but in that case I'd expect a non-zero
> exit status) or it gets its filedescriptors mixed up - in any case it
> does not work right.

Running a strace on fortune on both Intel and Sparc confirms that the file
descriptor thing is nothing to be worried about. An interesting note is
that on Intel and Sparc, the call is _llseek(), whereas on Alpha it's
lseek(). Those two functions also have completely different sets of
arguments. Certainly something that demands further investigation...

-- 
Chris Lumens - chris@slackware.com - KG6CIH
@n=(-42,-85,-83,-19,65,2,-10,-10,-15,-3,2,-10,73,-4,8,-4,2,79,8,17,15,7,14,2);
print map{chr(-$n[$i++]+ord)} sort(split(//,'place random string here')),"\n";



This archive was generated by hypermail 2b30 : Fri May 09 2003 - 10:00:02 PDT