develooper Front page | perl.perl5.porters | Postings from May 2015

[perl #123264] sysopen() has no documented return value.

Tony Cook via RT
May 26, 2015 06:30
[perl #123264] sysopen() has no documented return value.
Message ID:
On Sun May 17 09:05:34 2015, wrote:
> Neither
> nor the upcoming
> 5.21.11/pod/perlfunc.pod#sysopen-FILEHANDLE-FILENAME-MODE
> mention anything about the return value of sysopen(). Not providing a
> patch since I am not certain about any of the fine details (which is
> why
> I wet to look for the doc in the first place).

I think the return value of sysopen() is meant to be covered by this 
text in perlfunc:

In general, functions in Perl that serve as wrappers for system calls ("syscalls")
of the same name (like chown(2), fork(2), closedir(2), etc.) return
true when they succeed and C<undef> otherwise, as is usually mentioned
in the descriptions below.

but I've attached a patch that documents the return value in the sysopen()

If you're wondering "is it really that simple?" - here's the code from

    if (do_open_raw(gv, tmps, len, mode, perm)) {
	IoLINES(GvIOp(gv)) = 0;
    else {


via perlbug:  queue: perl5 status: open Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About