Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1637
b: refs/heads/master
c: 92515da
h: refs/heads/master
i:
  1635: 6ca2471
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed May 28, 2005
1 parent 36e8d7a commit 4bcd4c3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0894e27e7999bdbad2e65734caa1d5de65e7d890
refs/heads/master: 92515da73a5df50db45111b8659ac463b4800236
38 changes: 20 additions & 18 deletions trunk/arch/um/kernel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int main(int argc, char **argv, char **envp)
{
char **new_argv;
sigset_t mask;
int ret, i;
int ret, i, err;

/* Enable all signals except SIGIO - in some environments, we can
* enter with some signals blocked
Expand Down Expand Up @@ -160,27 +160,29 @@ int main(int argc, char **argv, char **envp)
*/
change_sig(SIGPROF, 0);

/* Reboot */
if(ret){
int err;

printf("\n");
/* This signal stuff used to be in the reboot case. However,
* sometimes a SIGVTALRM can come in when we're halting (reproducably
* when writing out gcov information, presumably because that takes
* some time) and cause a segfault.
*/

/* stop timers and set SIG*ALRM to be ignored */
disable_timer();
/* stop timers and set SIG*ALRM to be ignored */
disable_timer();

/* disable SIGIO for the fds and set SIGIO to be ignored */
err = deactivate_all_fds();
if(err)
printf("deactivate_all_fds failed, errno = %d\n",
-err);
/* disable SIGIO for the fds and set SIGIO to be ignored */
err = deactivate_all_fds();
if(err)
printf("deactivate_all_fds failed, errno = %d\n", -err);

/* Let any pending signals fire now. This ensures
* that they won't be delivered after the exec, when
* they are definitely not expected.
*/
unblock_signals();
/* Let any pending signals fire now. This ensures
* that they won't be delivered after the exec, when
* they are definitely not expected.
*/
unblock_signals();

/* Reboot */
if(ret){
printf("\n");
execvp(new_argv[0], new_argv);
perror("Failed to exec kernel");
ret = 1;
Expand Down

0 comments on commit 4bcd4c3

Please sign in to comment.