summaryrefslogtreecommitdiff
path: root/doio.c
Commit message (Collapse)AuthorAgeFilesLines
* Security hole in taint checking in open()deekoo2001-07-191-0/+1
| | | | | Message-Id: <Pine.LNX.4.33.0107182248330.11996-100000@chaos.tentacle.net> p4raw-id: //depot/perl@11410
* Based onNicholas Clark2001-07-021-3/+32
| | | | | | | | Subject: Re: sizeof(struct sembuf) Message-ID: <20010701222648.W59620@plum.flirble.org> but do semop() always the slow way. p4raw-id: //depot/perl@11098
* [ID 20010625.009] open(FILE,"+foo") [PATCH]Robert Spier2001-06-281-0/+1
| | | | | Message-ID: <15162.41164.618712.841415@rls.cx> p4raw-id: //depot/perl@10999
* gcc -Wall nits picked out by a non-UNIX systemJarkko Hietaniemi2001-06-121-24/+28
| | | | | (courtesy of Mark Bixby) p4raw-id: //depot/perl@10524
* More -Wall sweeping.Jarkko Hietaniemi2001-05-301-4/+4
| | | p4raw-id: //depot/perl@10338
* Medley of -Wall cleanups from Michael Schwen, Hugo van der Sanden,Jarkko Hietaniemi2001-05-301-1/+2
| | | | | and Abhijit Menon-Sen. p4raw-id: //depot/perl@10321
* O_APPEND and O_TRUNC are not portable. (Not available e.g.Jarkko Hietaniemi2001-05-271-1/+8
| | | | | for microperl.) p4raw-id: //depot/perl@10233
* [PATCH] [ID 19991013.005] utime undef, undef, @files Robert Spier2001-05-271-5/+16
| | | | | | | | | | | Date: Sat, 26 May 2001 20:05:23 -0400 Message-ID: <15120.17603.148648.12430@rls.cx> Subject: Re: [PATCH] [ID 19991013.005] utime undef, undef, @files From: rspier@pobox.com (Robert Spier) Date: Sun, 27 May 2001 00:23:12 -0400 Message-ID: <15120.33072.511966.767230@rls.cx> p4raw-id: //depot/perl@10232
* PerlIO for VMSCraig A. Berry2001-05-261-4/+2
| | | | | Message-Id: <a05100e0ab734816701a5@[172.16.52.1]> p4raw-id: //depot/perl@10218
* Fix for ID 20010519.003: sysopen() wasn't tainting :-(Jarkko Hietaniemi2001-05-201-3/+5
| | | p4raw-id: //depot/perl@10172
* Multiplicity and thread fixes for VMSDan Sugalski2001-05-021-2/+2
| | | | | Message-Id: <5.0.2.1.0.20010502112909.01f24e28@24.8.96.48> p4raw-id: //depot/perl@9960
* Make the "STD* opened only for ..." errors more consistent.Jarkko Hietaniemi2001-04-231-3/+5
| | | p4raw-id: //depot/perl@9802
* Avoid core dump onNick Ing-Simmons2001-04-201-1/+4
| | | | | open(STDOUT,">",\$foo); p4raw-id: //depot/perlio@9766
* Downgrade "Wide character in print" to a warning.Nick Ing-Simmons2001-04-041-2/+5
| | | p4raw-id: //depot/perlio@9549
* Fix un-init variable leading to spurious "Out of Memory!"Nick Ing-Simmons2001-03-241-1/+1
| | | p4raw-id: //depot/perlio@9332
* Implement:Nick Ing-Simmons2001-03-241-2/+4
| | | | | | 1. open($fh,"+<",undef); # add test to t/io/open.t 2. open($fh,"+<",\$var); # New test t/lib/io_scalar.t p4raw-id: //depot/perlio@9318
* Check in a stable (working) version before next round of tweaks.Nick Ing-Simmons2001-03-231-28/+7
| | | | | | | | | | Changes include: - Move default layers code out of doio.c and into perlio.c - Single routine for parsing layer specification strings. - Skeleton support for demand loading of layers - Core-dump avoidance if PERLIO environment specifies loadable layer (does not _work_ as need IO to load and need load to do IO ...) p4raw-id: //depot/perlio@9313
* Avoid "reopen" semantics for time being. Fix bug in dup logic.Nick Ing-Simmons2001-03-231-13/+13
| | | | | | -Uuseperlio now works again. -Duseperlio is still poorly. Don't merge yet... p4raw-id: //depot/perlio@9303
* Snapshot of new PerlIO open scheme. Still buggy - mainly in ↵Nick Ing-Simmons2001-03-221-89/+99
| | | | | | | | | | | | | | | open($fh,">&STDOUT!") type code. - Invent PerlIO_openn() - which has "lots" of args a bit like do_openn() which is its main caller. In particular now has access to "extra" args, and can tell when an open handle is "reopened" (or duped?). - In -Duseperlio PerlIO_open() et. al. are now wrappers on PerlIO_openn(). - In -Uuseperlio (untested as yet) PerlIO_openn() is a wrapper on PerlIO_open() et. al. (i.e. other way round). - Collapse "vtable" entries for layers - was fdopen/open/reopen now just open with args close to PerlIO_openn(). p4raw-id: //depot/perlio@9302
* Give a meaning to '&' in n-arg open case:Nick Ing-Simmons2001-03-221-17/+25
| | | | | | | | | | | | | open($fh,"<&",$scalar); $scalar can be: - an integer which does "fdopen" open($fh,"<&",2); # like open($fh,"<&2") - something that will yield a file handle via sv_2io() useful for dup'ing anonymous handles. e.g.: open(my $fh,"<&",\*STDIN); open(my $dup,"<&",$fh); p4raw-id: //depot/perlio@9298
* If stdin, stdout or stderr get opened in unexpected read/write stateNick Ing-Simmons2001-03-221-3/+13
| | | | | then warn at time of open not at time of use. p4raw-id: //depot/perlio@9295
* Die on n-arg open(...,"",xxx,yyy,...)Nick Ing-Simmons2001-03-221-6/+30
| | | | | | - redirect pipe cases to PerlProc_popen_list() (which just croaks for now) - die on read/write cases so we can decide what it means later. p4raw-id: //depot/perlio@9294
* Re: sync sync sync: have I missed any patches?Radu Greab2001-03-021-3/+6
| | | | | | | | | | | Message-ID: <15006.42826.747914.669893@ix.netsoft.ro> Fixes the bugs 20010221.005 and 20010221.008: "the taint checker was checking argv[0] regardless of whether a different pathname will actually be executed." Test case not supplied because drafting that, ironically enough, revealed another bug (or a feature). p4raw-id: //depot/perl@8982
* Re: sync sync sync: have I missed any patches?Tim Jenness2001-02-281-2/+2
| | | | | | | | In-Reply-To: <20010227140737.Y10633@chaos.wustl.edu> Message-ID: <Pine.LNX.4.30.0102271322070.8623-100000@lapaki.jach.hawaii.edu> Replace djSP with dSP. p4raw-id: //depot/perl@8963
* [patch] -WallDoug MacEachern2001-02-171-2/+1
| | | | | Message-ID: <Pine.LNX.4.21.0102161519500.30352-100000@mako.covalent.net> p4raw-id: //depot/perl@8815
* Patch from Inaba Hiroto:Jarkko Hietaniemi2001-01-281-6/+5
| | | | | | | | | | | | | | | | | | | | | | | - canonical UTF-8 hash keys: if a key string for a hash is UTF8-on, try downgrade the string and use it if unicode::distinct is not in effect. For the task, I added a function bytes_from_utf8() to utf8.c. It might resemble utf8_to_bytes() but it is not convenient to the task. Made a test for it and added to t/op/each.t - Changed do_print in doio.c to apply sv_utf8_(downgrade|upgrade) to the mortal copy of the argument SV. And changed t/io/utf8.t test 18 which expects print() to upgrade its argument. - re-implement sv_eq with bytes_from_utf8() - some bug fixes - tr/// does not handle UTF8 range (\x{}-\x{}) - \ before raw UTF8 character produced "Malformed UTF-8 character" warning. - "\x{100}\N{CENT SIGN}" is Malformed. Added tests for these 3. - and one silly bug (by me) with qu operator. p4raw-id: //depot/perl@8583
* Infrastructure to allow:Nick Ing-Simmons2001-01-201-2/+13
| | | | | | | | | | open($fh,"|-",@array); to be implemented i.e. mark pp_open as needing a stack mark, and make pp_open process its args in that style (and pass them _all_ to tied handles OPEN). Invent do_openn() which takes SV ** at allow it to see multiple args. Note this does not _do_ anything yet. p4raw-id: //depot/perlio@8484
* Bump up Larry's copyright.Jarkko Hietaniemi2001-01-011-1/+1
| | | p4raw-id: //depot/perl@8289
* Further VMS piping fixes from Charles Lane:Jarkko Hietaniemi2000-12-291-0/+9
| | | | | | | | | | | | | | | | | In summary, error messages produced when a subprocess terminated abnormally were being sent not just to the parent process, but to grandparents, because of default values for error output that were not completely overridden when the subprocess was started. This patch fixes this behavior by defining user-mode (i.e., temporary for the duration of the program) logical names for SYS$OUTPUT and SYS$ERROR when they are (re)opened inside Perl. And a bunch of other changes to make it so that the user-mode logicals are the ones that control where Perl's error messages go if it terminates abnormally. I also added some gratuitous fixes to the indentation of braces in the piping code. It just looked ugly, before. p4raw-id: //depot/perl@8257
* move startglob out of pp_hot.cNicholas Clark2000-12-131-0/+145
| | | | | Message-ID: <20001211231638.A55550@plum.flirble.org> p4raw-id: //depot/perl@8097
* Make print, syswrite, send, readline, getc honour utf8-ness of PerlIO.Nick Ing-Simmons2000-12-091-6/+8
| | | | | | | | | | | | | | | (sysread, recv and write i.e. formats still to do...) Allow :utf8 or :bytes in PerlIO_apply_layers() so that open($fh,">:utf8","name") etc. work. - "applying" those just sets/clears the UTF8 bit of the top layer, so no extra overhead is involved. Tweak t/comp/require.t to add a 'use bytes' to permit its dubious writing of BOM to a non-utf8 stream. Add initial io/utf8.t Fix SvPVutf8() - sv_2pv() was not expecting to be called with something that was already SvPOK() - (we just fossiked with SvUTF8 bit). Fix that and also just use the SvPV macro in sv_2pvutf8() to avoid the issue/overhead. p4raw-id: //depot/perlio@8054
* dTHR is a nop in 5.6.0 onwards. Ergo, it can go.Jarkko Hietaniemi2000-12-051-39/+8
| | | p4raw-id: //depot/perl@7984
* Quieten some noise in Win32 builds:Nick Ing-Simmons2000-12-041-2/+2
| | | | | | | - win32.h is included after <sys/socket.h>, so need to set Win32SCK_IS_STDSCK earlier to avoid re-defined noise in XSUB.h - GCC (& MSVC?) have execv(...,const char *const *) so need a cast from char **. p4raw-id: //depot/perlio@7971
* Integrate mainline.Nick Ing-Simmons2000-11-251-161/+2
|\ | | | | p4raw-id: //depot/perlio@7859
| * Undo the SOCKS workarounds, instead start using PerlIOJens Hamisch2000-11-251-174/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | if SOCKS is selected. Subject: perl@7847, [ID 20001030.005], close-patch, perlio - The big cleanup Date: Fri, 24 Nov 2000 18:31:30 +0100 Message-ID: <20001124183130.E28337@Strawberry.COM> Subject: Re: perl@7847, [ID 20001030.005], close-patch, perlio - Patch the patch ... From: Jens Hamisch <jens@Strawberry.COM> Date: Fri, 24 Nov 2000 19:11:51 +0100 Message-ID: <20001124191151.A28753@Strawberry.COM> p4raw-id: //depot/perl@7855
| * Integrate perlio:Jarkko Hietaniemi2000-11-241-59/+53
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 7844] Win32/perlio Now just fails one io/argv.t test - lack of default :crlf on standard streams. [ 7843] Win32 passes all but t/lib/peek.t with perlio and home-grown crlf. peek fail is showing a real problem (multiple crlf layers are getting pushed.) [ 7842] Implement PerlIO_binmode() Fix PerlIOCrlf_unread() (*--ptr rather than *ptr-- ...) Test on UNIX with PERLIO="perlio crlf" to mimic Win32, make binmode in t/lib/io_tell.t unconditional so that works. Checkin just so Win32 machine can see these changes. [ 7836] Implement crlf layer - not ready for merge. p4raw-link: @7844 on //depot/perlio: de6cd452fde5aaf57e339f71b33b6a0852f0f96d p4raw-link: @7843 on //depot/perlio: 63dbdb066b93ac25a070d3a7942d248c23ec6088 p4raw-link: @7842 on //depot/perlio: 60382766f71ec2a2d8e34a951c5c77b494bd86bb p4raw-link: @7836 on //depot/perlio: 99efab1281ccea6f7df2a4d0affc5479291e2350 p4raw-id: //depot/perl@7847
| * | SOCKS wrestling continues, patches from Jens Hamisch.Jarkko Hietaniemi2000-11-231-18/+17
| | | | | | | | | p4raw-id: //depot/perl@7840
| * | Finish unfinished SOCKS workaround changes.Jarkko Hietaniemi2000-11-231-19/+9
| | | | | | | | | p4raw-id: //depot/perl@7833
* | | Re-arrange crlf vs binary for platforms that care.Nick Ing-Simmons2000-11-241-5/+6
| |/ |/| | | | | | | | | | | | | crlf layer is now "the" buffer layer and can turn its behaviour on/off. Lip-service to making stdio layer work on such platforms (untested). Now fails 3 tests rather than one, checkin to see if I can debug the issue under linux. (Do not merge.) p4raw-id: //depot/perlio@7853
* | Win32/perlio Now just fails one io/argv.t test - lack Nick Ing-Simmons2000-11-231-1/+1
| | | | | | | | | | of default :crlf on standard streams. p4raw-id: //depot/perlio@7844
* | Win32 passes all but t/lib/peek.t with perlio and home-grown crlf.Nick Ing-Simmons2000-11-231-1/+1
| | | | | | | | | | | | peek fail is showing a real problem (multiple crlf layers are getting pushed.) p4raw-id: //depot/perlio@7843
* | Implement PerlIO_binmode()Nick Ing-Simmons2000-11-231-43/+12
|/ | | | | | | | Fix PerlIOCrlf_unread() (*--ptr rather than *ptr-- ...) Test on UNIX with PERLIO="perlio crlf" to mimic Win32, make binmode in t/lib/io_tell.t unconditional so that works. Checkin just so Win32 machine can see these changes. p4raw-id: //depot/perlio@7842
* More SOCKS versus 64-bit patches from Jens Hamisch.Jarkko Hietaniemi2000-11-221-5/+8
| | | p4raw-id: //depot/perl@7818
* Go ahead and #include <unistd.h> in perl.h.Jarkko Hietaniemi2000-11-221-5/+0
| | | p4raw-id: //depot/perl@7816
* Integrate perlio:Jarkko Hietaniemi2000-11-211-7/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 7796] Win32 builds and runs (mostly) with USE_PERLIO. PERLIO=perlio passes all tests. PERLIO=stdio (sadly the default) hangs in t.pragma/warnings.t #319 [ 7790] If we use (aTHX_ ...) then put Perl_ on the front. (Or drop the aTHX_). [ 7788] Make extra buffer layer work (dummy crlf layer) p4raw-link: @7796 on //depot/perlio: 83b075c35b61a28ca7e2629bb5d6e26f9e0354fe p4raw-link: @7790 on //depot/perlio: efeab7a8047d7136a0235c1cc7329f57d6a8bfdd p4raw-link: @7788 on //depot/perlio: 88b61e10dfef3b0642d1458a9fff93e5000f86b0 p4raw-id: //depot/perl@7797
| * Integrate mainlineNick Ing-Simmons2000-11-201-0/+156
| |\ | | | | | | p4raw-id: //depot/perlio@7789
| * | Make extra buffer layer work (dummy crlf layer)Nick Ing-Simmons2000-11-201-7/+6
| | | | | | | | | p4raw-id: //depot/perlio@7788
* | | Export the SOCKS workaround symbols only if necessary.Jarkko Hietaniemi2000-11-211-3/+5
| |/ |/| | | p4raw-id: //depot/perl@7791
* | Add a workaround to SOCKS 64-bit problems.Jarkko Hietaniemi2000-11-201-0/+156
|/ | | p4raw-id: //depot/perl@7774
* Lexical use open ... support:Nick Ing-Simmons2000-11-181-0/+27
| | | | | | | | | | | | add ->cop_io to COP structure in cop.h. Make mg.c and gv.c associate it with ${^OPEN}. Make lib/open.pm set it. Have sv.c, perl.c, pp_ctl.c, op.c manipulate it in a manner manner similar to ->cop_warnings. Have doio.c's do_open9 and pp_sys.c's pp_backticks use it as default and call new PerlIO_apply_layers(). Declare latter in perlio.h and define in perlio.c p4raw-id: //depot/perlio@7740