* sigproc.cc (child_info::child_info): Initialize msv_count.

This commit is contained in:
Christopher Faylor 2006-12-12 15:58:08 +00:00
parent 46b51548b1
commit a10c6f0312
2 changed files with 28 additions and 23 deletions

View File

@ -59,7 +59,7 @@
now always filled out. now always filled out.
* fork.cc (frok::parent): Move ch.zero manipulation to constructor. * fork.cc (frok::parent): Move ch.zero manipulation to constructor.
* spawn.cc (spawn_guts): Ditto. Remove _ch wrapper. * spawn.cc (spawn_guts): Ditto. Remove _ch wrapper.
* sigproc.cc (child_info::child_info): Initialize starter[]. * sigproc.cc (child_info::child_info): Initialize msv_count.
* shared.cc (shared_info::heap_slop_size): Remove noisy system_printfs. * shared.cc (shared_info::heap_slop_size): Remove noisy system_printfs.
* shared_info.h (CURR_SHARED_MAGIC): Regenerate. * shared_info.h (CURR_SHARED_MAGIC): Regenerate.

View File

@ -193,9 +193,9 @@ try_to_bin (path_conv &win32_path, HANDLE h)
while (*c) while (*c)
++c; ++c;
if (GetFileAttributes (recycler) == INVALID_FILE_ATTRIBUTES) if (GetFileAttributes (recycler) == INVALID_FILE_ATTRIBUTES)
{ {
if (!CreateDirectory (recycler, if (!CreateDirectory (recycler,
sec_user ((PSECURITY_ATTRIBUTES) alloca (1024), sec_user ((PSECURITY_ATTRIBUTES) alloca (1024),
cygheap->user.sid ()))) cygheap->user.sid ())))
{ {
debug_printf ("Can't create folder %s, %E", recycler); debug_printf ("Can't create folder %s, %E", recycler);
@ -308,7 +308,7 @@ unlink_nt (path_conv &win32_name, bool setattrs)
also means that deleting fails. */ also means that deleting fails. */
syscall_printf ("%p = NtClose (%p)", status, h); syscall_printf ("%p = NtClose (%p)", status, h);
if (!lasterr) if (!lasterr)
RtlNtStatusToDosError (status); RtlNtStatusToDosError (status);
} }
syscall_printf ("Deleting succeeded"); syscall_printf ("Deleting succeeded");
@ -381,7 +381,7 @@ unlink (const char *ourname)
if ((wincap.access_denied_on_delete () && lasterr == ERROR_ACCESS_DENIED if ((wincap.access_denied_on_delete () && lasterr == ERROR_ACCESS_DENIED
&& !win32_name.isremote ()) && !win32_name.isremote ())
|| lasterr == ERROR_SHARING_VIOLATION) || lasterr == ERROR_SHARING_VIOLATION)
{ {
/* Add file to the "to be deleted" queue. */ /* Add file to the "to be deleted" queue. */
syscall_printf ("Sharing violation, couldn't delete file"); syscall_printf ("Sharing violation, couldn't delete file");
user_shared->delqueue.queue_file (win32_name); user_shared->delqueue.queue_file (win32_name);
@ -1787,7 +1787,7 @@ posix_fadvise (int fd, _off64_t offset, _off64_t len, int advice)
else else
set_errno (EBADF); set_errno (EBADF);
syscall_printf ("%d = posix_fadvice (%d, %D, %D, %d)", syscall_printf ("%d = posix_fadvice (%d, %D, %D, %d)",
res, fd, offset, len, advice); res, fd, offset, len, advice);
return res; return res;
} }
@ -2230,7 +2230,7 @@ seteuid32 (__uid32_t uid)
if (new_token == INVALID_HANDLE_VALUE) if (new_token == INVALID_HANDLE_VALUE)
{ {
if (!(new_token = lsaauth (usersid, groups, pw_new))) if (!(new_token = lsaauth (usersid, groups, pw_new)))
{ {
#if 0 #if 0
new_token = subauth (pw_new); new_token = subauth (pw_new);
debug_printf ("subauth %s, try create_token.", debug_printf ("subauth %s, try create_token.",
@ -3245,39 +3245,44 @@ funlockfile (FILE *file)
} }
extern "C" FILE * extern "C" FILE *
popen (const char *command, const char *type) popen (const char *command, const char *in_type)
{ {
int fds[2]; const char *type = in_type;
char rw = *type++;
if (pipe (fds) < 0) if (*type == 'b' || *type == 't')
return NULL; type++;
int fd, other_fd, __stdin, __stdout, stdwhat; if ((rw != 'r' && rw != 'w') || (*type != '\0'))
if (type[1] != '\0')
{ {
set_errno (EINVAL); set_errno (EINVAL);
return NULL; return NULL;
} }
if (*type == 'r')
int fd, other_fd, __stdin, __stdout, stdwhat;
int fds[2];
if (pipe (fds) < 0)
return NULL;
switch (rw)
{ {
case 'r':
__stdin = -1; __stdin = -1;
stdwhat = 1; stdwhat = 1;
other_fd = __stdout = fds[1]; other_fd = __stdout = fds[1];
fd = fds[0]; fd = fds[0];
} break;
else if (*type == 'w') case 'w':
{
__stdout = -1; __stdout = -1;
stdwhat = 0; stdwhat = 0;
other_fd = __stdin = fds[0]; other_fd = __stdin = fds[0];
fd = fds[1]; fd = fds[1];
} break;
else default:
{ return NULL; /* avoid a compiler warning */
set_errno (EINVAL);
return NULL;
} }
FILE *fp = fdopen (fd, type); FILE *fp = fdopen (fd, in_type);
fcntl (fd, F_SETFD, fcntl (fd, F_GETFD, 0) | FD_CLOEXEC); fcntl (fd, F_SETFD, fcntl (fd, F_GETFD, 0) | FD_CLOEXEC);
if (!fp) if (!fp)