in reply to Re^6: fcntl failure after eval
in thread fcntl failure after eval

So the reason you don't hit this problem with most system/library calls is that they take simple datatypes rather than structs?

If so, how come this isn't an issue with readdir()? The manpage says that needs a structure also...

Replies are listed 'Best First'.
Re^8: fcntl failure after eval
by ikegami (Patriarch) on Aug 12, 2011 at 20:44 UTC
    The argument of the readdir system call is a file descriptor, and Perl passes that to it. The last argument of fcntl system call is a pointer to a series of bytes of no defined format. Perl allows you to pass that to it.