syscall.c (0f6f99032e495b28b8d455144610c5a84a7067d8) syscall.c (02d0de101c797d14115629818823c0e062c64d26)
1/*
2 * Linux syscalls
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 8966 unchanged lines hidden (view full) ---

8975 case TARGET_NR_getpgrp:
8976 return get_errno(getpgrp());
8977#endif
8978 case TARGET_NR_setsid:
8979 return get_errno(setsid());
8980#ifdef TARGET_NR_sigaction
8981 case TARGET_NR_sigaction:
8982 {
1/*
2 * Linux syscalls
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 8966 unchanged lines hidden (view full) ---

8975 case TARGET_NR_getpgrp:
8976 return get_errno(getpgrp());
8977#endif
8978 case TARGET_NR_setsid:
8979 return get_errno(setsid());
8980#ifdef TARGET_NR_sigaction
8981 case TARGET_NR_sigaction:
8982 {
8983#if defined(TARGET_ALPHA)
8984 struct target_sigaction act, oact, *pact = 0;
8985 struct target_old_sigaction *old_act;
8986 if (arg2) {
8987 if (!lock_user_struct(VERIFY_READ, old_act, arg2, 1))
8988 return -TARGET_EFAULT;
8989 act._sa_handler = old_act->_sa_handler;
8990 target_siginitset(&act.sa_mask, old_act->sa_mask);
8991 act.sa_flags = old_act->sa_flags;
8992 unlock_user_struct(old_act, arg2, 0);
8993 pact = &act;
8994 }
8995 ret = get_errno(do_sigaction(arg1, pact, &oact, 0));
8996 if (!is_error(ret) && arg3) {
8997 if (!lock_user_struct(VERIFY_WRITE, old_act, arg3, 0))
8998 return -TARGET_EFAULT;
8999 old_act->_sa_handler = oact._sa_handler;
9000 old_act->sa_mask = oact.sa_mask.sig[0];
9001 old_act->sa_flags = oact.sa_flags;
9002 unlock_user_struct(old_act, arg3, 1);
9003 }
9004#elif defined(TARGET_MIPS)
8983#if defined(TARGET_MIPS)
9005 struct target_sigaction act, oact, *pact, *old_act;
9006
9007 if (arg2) {
9008 if (!lock_user_struct(VERIFY_READ, old_act, arg2, 1))
9009 return -TARGET_EFAULT;
9010 act._sa_handler = old_act->_sa_handler;
9011 target_siginitset(&act.sa_mask, old_act->sa_mask.sig[0]);
9012 act.sa_flags = old_act->sa_flags;

--- 4272 unchanged lines hidden ---
8984 struct target_sigaction act, oact, *pact, *old_act;
8985
8986 if (arg2) {
8987 if (!lock_user_struct(VERIFY_READ, old_act, arg2, 1))
8988 return -TARGET_EFAULT;
8989 act._sa_handler = old_act->_sa_handler;
8990 target_siginitset(&act.sa_mask, old_act->sa_mask.sig[0]);
8991 act.sa_flags = old_act->sa_flags;

--- 4272 unchanged lines hidden ---