Staging
v0.5.1
https://github.com/python/cpython
Revision 0e42f0e7991e0ae7484ea7cdc339e6293a5fd169 authored by Gregory P. Smith on 19 January 2008, 22:35:09 UTC, committed by Gregory P. Smith on 19 January 2008, 22:35:09 UTC
- Issue #1336: fix a race condition in subprocess.Popen if the garbage
  collector kicked in at the wrong time that would cause the process
  to hang when the child wrote to stderr.
1 parent 80ebe95
Raw File
Tip revision: 0e42f0e7991e0ae7484ea7cdc339e6293a5fd169 authored by Gregory P. Smith on 19 January 2008, 22:35:09 UTC
Backport r60104 + r60111 from trunk.
Tip revision: 0e42f0e
getmtime.c

/* Subroutine to get the last modification time of a file */

/* (A separate file because this may be OS dependent) */

#include "Python.h"
#include "pyconfig.h"

time_t
PyOS_GetLastModificationTime(char *path, FILE *fp)
{
	struct stat st;
	if (fstat(fileno(fp), &st) != 0)
		return -1;
	else
		return st.st_mtime;
}
back to top