summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove warnings from the SGI compiler.Fred Drake2001-07-191-1/+1
| | | | This is part of SF patch #434992.
* On Windows, tempnam() is spelled with a leading underscore.Fred Drake2001-07-171-0/+4
|
* Re-do the broken-nice() patch to break less platforms. Hopefully none :PThomas Wouters2001-07-111-3/+9
| | | | | | | Also note that it isn't just Linux nice() that is broken: at least FreeBSD and BSDI also have this problem. os.nice() should probably just be emulated using getpriority()/setpriority(), if they are available, but I'll get to that later.
* Patch #439995 (slightly modified from the uploaded version):Thomas Wouters2001-07-111-1/+18
| | | | | | | Work around Linux's nonstandard nice() systemcall, which does not return the new priority. This closes SF bug #439990.
* SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen.Tim Peters2001-05-141-10/+8
|
* Fix the Py_FileSystemDefaultEncoding checkin - declare the variable in a ↵Mark Hammond2001-05-141-10/+0
| | | | fileobject.h, and initialize it in bltinmodule.
* Add support for Windows using "mbcs" as the default Unicode encoding when ↵Mark Hammond2001-05-131-40/+99
| | | | dealing with the file system. As discussed on python-dev and in patch 410465.
* Make some private symbols static.Guido van Rossum2001-04-141-1/+1
|
* Unixware 7 support by Billy G. Allie (SF patch 413011)Guido van Rossum2001-04-111-0/+30
|
* conditionally include unistd.h to pick up confstr declaration. attempt toSkip Montanaro2001-02-271-0/+5
| | | | | squelch warning from GCC 2.95.2 on Solaris - partially addresses bug #232787.
* Add a few more missing prototypes to the SunOS 4.1.4 section (no SFThomas Wouters2001-02-151-0/+3
| | | | | bugreport, just an IRC one by Marion Delgado.) These prototypes are necessary because the functions are tossed around, not just called.
* Partial fix to [ Bug #128685 ] popen on Win9x isnt smart enough about ↵Mark Hammond2001-01-311-9/+45
| | | | | | | | finding w9xpopen.exe. "Partial" as the code uses sys.prefix in an attempt to locate 'w9xpopen.exe', but sys.prefix is not set if Python can't find it itself. So this _still_ fails in Pythonwin, but I am committing the patch for 2 reasons: * Embedded apps that set sys.prefix or use PYTHONHOME will work * The exception raised on failure to find the executable is far more obvious
* Fix Bug #125891 - os.popen2,3 and 4 leaked file objects on Windows.Mark Hammond2001-01-311-0/+5
|
* Plug memory leak.Neil Schemenauer2001-01-161-1/+2
|
* Anonymous SF bug report #128053 point out that the #ifdef forGuido van Rossum2001-01-081-1/+1
| | | | | including "tmpfile" in the posix_methods[] array is wrong -- should be HAVE_TMPFILE, not HAVE_TMPNAM.
* Trivial typo fix, submitted by Charles Waldman (SF patch #102794).Guido van Rossum2000-12-121-1/+1
|
* posix_getlogin(): Be more cautious about interpreting a NULL fromFred Drake2000-12-061-1/+1
| | | | | getlogin() -- it is not clear that a NULL is always an error.
* posix_getlogin(): Handle the possibility that getlogin() can returnFred Drake2000-12-061-3/+12
| | | | | | | NULL without setting errno; observed on Linux Mandrake 7.2 by an anonymous user. This closes bug #124758.
* Ka-Ping Yee <ping@lfw.org>:Fred Drake2000-10-241-28/+28
| | | | | | Changes to error messages to increase consistency & clarity. This (mostly) closes SourceForge patch #101839.
* Clarify that isatty is only guaranteed to return true for slave ends ofThomas Wouters2000-10-031-1/+1
| | | | terminals, not the master end (though it does, on most systems.)
* Add missing prototypes for the benefit of SunOS 4.1.4 */Guido van Rossum2000-09-251-0/+7
|
* It's better to test for __hpux rather than __hppa, and hpux or hppa isGuido van Rossum2000-09-221-1/+1
| | | | unnecessary. Sez edg@SF
* Hopefully fix the problem with undeclared fdatasync() on HP-UX thatGuido van Rossum2000-09-221-0/+5
| | | | | | | was reported twice so far. Someone with access to HP-UX, please test this! (Is '__hppa' or 'hppa' really the correct symbol to test for?)
* Implemented new os.startfile function, unique to Windows, exposing aTim Peters2000-09-221-0/+33
| | | | | | | | | | | | | | | | subset of Win32 ShellExecute's functionality. Guido wants this because IDLE's Help -> Docs function currently crashes his machine because of a conflict between his version of Norton AntiVirus (6.10.20) and MS's _popen. Docs for startfile are being mailed to Fred (or just read the docstring -- it tells the whole story). Changed webbrowser.py to use os.startfile instead of os.popen on Windows. Changed IDLE's EditorWindow.py to pass an absolute path for the docs (hardcoding ShellExecute's "directory" arg to "." as used to be done let IDLE work, but made the startfile command exceedingly obscure for other uses -- the MS docs are terrible, of course, & still not sure I understand it). Note that Windows Python must link with shell32.lib now! That's where ShellExecute lives.
* Closes SF bug 113894: on Windows, things like os.listdir("k:") andTim Peters2000-09-151-9/+7
| | | | | | glob.glob("k:*py") (i.e., a raw drive letter + colon at the start) were using the root of the drive rather than the expected Windows behavior of using the drive's "current directory".
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* Repaired damaged comments, and extra spaces in fatal error msgs we'd betterTim Peters2000-09-011-6/+7
| | | | not ever see!
* Fix test_popen2 on Windows, recently broken by changes to the dict(!)Tim Peters2000-09-011-1/+57
| | | | | | | implementation. You don't want to know. I've asked Guido to give this a critical review (we agreed on the approach, but the implementation proved more ... interesting ... than anticipated). This will almost certainly be the highlight of Mark Hammond's day <wink>.
* Chris Herborth <chrish@pobox.com>:Fred Drake2000-08-151-5/+0
| | | | | | | | | Minor updates for BeOS R5. Use of OSError in test.test_fork1 changed to TestSkipped, with corresponding change in BeOS/README (by Fred). This closes SourceForge patch #100978.
* Fix for bug #110670 - Win32 os.listdir raises confusing errors:Mark Hammond2000-08-151-3/+7
| | | | The existing win32_error() function now returns the new(ish) WindowsError, ensuring we get correct error messages.
* Patch #101032, from David Bolen:Mark Hammond2000-08-141-48/+154
| | | | | This is an enhancement to a prior patch (100941) ... [T]his patch removes the risk of deadlock waiting for the child previously present in certain cases. It adds tracking of all file handles returned from an os.popen* call and only waits for the child process, returning the exit code, on the closure of the final file handle to that child.
* merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp2000-07-311-2/+0
| | | | marked my*.h as obsolete
* - changed windows pclose to make sure we don't return before theFredrik Lundh2000-07-261-10/+21
| | | | | underlying process has terminated (bug fix from David Bolen)
* Create a new section of pyport.h to hold all external function declarationsThomas Wouters2000-07-241-20/+2
| | | | | | | | | | | | | | for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though.
* -- added code to the new Windows popen functions to make closeFredrik Lundh2000-07-231-8/+90
| | | | | | return the exit code. Only works on Windows NT/2000, due to limitations in the Win9X shell. (based on patch #100941 by David Bolen)
* Even more ANSIfication: fix as many function pointers and declarations asThomas Wouters2000-07-221-5/+5
| | | | possible.
* Remove unused helper-function 'posix_strint'.Thomas Wouters2000-07-221-18/+0
|
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-9/+6
| | | | | | | | | | | | | | | | | | and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
* ANSIfy the just-checked-in isatty() wrapper.Thomas Wouters2000-07-191-3/+1
|
* new method isatty from Thomas WoutersSkip Montanaro2000-07-191-0/+16
|
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-4/+4
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* Move (actually copy) support for the sgi._getpty() function intoThomas Wouters2000-07-141-5/+24
| | | | | | | posix.openpty(). And conveniently also check if CVS write access really works. Closes SF patch #100722
* From Sam Rushing's Medusa, via SF patch #100858: add & documentAndrew M. Kuchling2000-07-131-0/+88
| | | | os.seteuid(), os.setegid(), os.setreuid(), os.setregid().
* replace PyXXX_Length calls with PyXXX_Size callsJeremy Hylton2000-07-121-2/+2
|
* - stupid typo.Fredrik Lundh2000-07-101-1/+1
|
* -- get rid of a compiler warning on unix. (as reportedFredrik Lundh2000-07-101-21/+13
| | | | for #100836, but implemented in a different way)
* - changed the nt.popen2 return values back toFredrik Lundh2000-07-091-30/+30
| | | | | | | | (write, read, ...), based on feedback from GvR. - added tuple-swapping code to popen2.py - fixed some runaway indentation in posixmodule.c
* - added popen.popen2/popen3/popen4 support forFredrik Lundh2000-07-091-7/+7
| | | | | | | | | | | | windows. - added optional mode argument to popen2/popen3 for unix; if the second argument is an integer, it's assumed to be the buffer size. - changed nt.popen2/popen3/popen4 return values to match the popen2 module (stdout first, not stdin).
* - added optional bufsize argument to new popen methods.Fredrik Lundh2000-07-091-7/+30
| | | | | for the moment, this argument must be left out or set to -1 (only the default bufsize is supported, that is)
* - improved os.popen support for windows, based on win32pipeFredrik Lundh2000-07-091-6/+462
| | | | | | | by Bill Tutt. note: to run this on Windows 95/98, you need to have the w9xpopen.exe helper in the same directory as the python DLL.