Ok, omitting the last input appears to be acceptable.

$ perl -wE'say length pack "sslli", 0, 0, 0, 0;' 16 $ perl -wE'say length pack "sslli", 0, 0, 0, 0, 0;' 16

However, that's far shorter than expected, at least on the 64-bit system I used.

$ cat a.c #include <fcntl.h> #include <stddef.h> #include <stdio.h> int main() { struct flock lock; printf("flock: %lu\n", sizeof(lock)); printf("flock.l_type: %lu @ %2lu\n", sizeof(lock.l_type ), offse +tof(struct flock, l_type )); printf("flock.l_whence: %lu @ %2lu\n", sizeof(lock.l_whence), offse +tof(struct flock, l_whence)); printf("flock.l_start: %lu @ %2lu\n", sizeof(lock.l_start ), offse +tof(struct flock, l_start )); printf("flock.l_len: %lu @ %2lu\n", sizeof(lock.l_len ), offse +tof(struct flock, l_len )); printf("flock.l_pid: %lu @ %2lu\n", sizeof(lock.l_pid ), offse +tof(struct flock, l_pid )); return 0; } $ gcc -Wall a.c -o a && a flock: 32 flock.l_type: 2 @ 0 flock.l_whence: 2 @ 2 flock.l_start: 8 @ 8 flock.l_len: 8 @ 16 flock.l_pid: 4 @ 24

On that system, one would need

$ perl -wE'say length pack "s s x4 q q L x4", 0, 0, 0, 0, 0;' 32

In reply to Re^2: fcntl failure after eval by ikegami
in thread fcntl failure after eval by flipper

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.