亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sigact.c

?? 一個開放源代碼的 AT&T 的 Korn Shell 的復制品, 支持大多數 ksh89 的特性。
?? C
字號:
/* NAME: *      sigact.c - fake sigaction(2) * * SYNOPSIS: *      #include "sigact.h" *  *      int sigaction(int sig, struct sigaction *act,  *                      struct sigaction *oact); *      int sigaddset(sigset_t *mask, int sig); *      int sigdelset(sigset_t *mask, int sig); *      int sigemptyset(sigset_t *mask); *      int sigfillset(sigset_t *mask); *      int sigismember(sigset_t *mask, int sig); *      int sigpending(sigset_t *set); *      int sigprocmask(int how, sigset_t *set, sigset_t *oset); *      int sigsuspend(sigset_t *mask); *       *      RETSIGTYPE (*Signal(int sig, RETSIGTYPE (*disp)(int)))(int); * * DESCRIPTION: *      This is a fake sigaction implementation.  It uses  *      sigsetmask(2) et al or sigset(2) and friends if  *      available, otherwise it just uses signal(2).  If it  *      thinks sigaction(2) really exists it compiles to "almost"  *      nothing.  *       *      In any case it provides a Signal() function that is  *      implemented in terms of sigaction(). *      If not using signal(2) as part of the underlying  *      implementation (USE_SIGNAL or USE_SIGMASK), and  *      NO_SIGNAL is not defined, it also provides a signal()  *      function that calls Signal().  * *      The need for all this mucking about is the problems  *      caused by mixing various signal handling mechanisms in  *      the one process.  This module allows for a consistent  *      POSIX compliant interface to whatever is actually  *      available.  *       *      sigaction() allows the caller to examine and/or set the  *      action to be associated with a given signal. "act" and  *      "oact" are pointers to 'sigaction structs': *.nf *  *      struct sigaction  *      { *             RETSIGTYPE  (*sa_handler)(); *             sigset_t  sa_mask; *             int       sa_flags; *      }; *.fi *  *      RETSIGTYPE is normally 'void' in the POSIX implementation  *      and for most current systems.  On some older UNIX  *      systems, signal handlers do not return 'void', so   *      this implementation keeps 'sa_handler' inline with the  *      hosts normal signal handling conventions. *      'sa_mask' controls which signals will be blocked while  *      the selected signal handler is active.  It is not used  *      in this implementation. *      'sa_flags' controls various semantics such as whether  *      system calls should be automagically restarted  *      (SA_RESTART) etc.  It is not used in this  *      implementation.  *      Either "act" or "oact" may be NULL in which case the  *      appropriate operation is skipped. *       *      sigaddset() adds "sig" to the sigset_t pointed to by "mask". *       *      sigdelset() removes "sig" from the sigset_t pointed to  *      by "mask".  *       *      sigemptyset() makes the sigset_t pointed to by "mask" empty. *       *      sigfillset() makes the sigset_t pointed to by "mask"  *      full ie. match all signals. *       *      sigismember() returns true if "sig" is found in "*mask". *       *      sigpending() is supposed to return "set" loaded with the  *      set of signals that are blocked and pending for the  *      calling process.  It does nothing in this impementation. *       *      sigprocmask() is used to examine and/or change the  *      signal mask for the calling process.  Either "set" or  *      "oset" may be NULL in which case the appropriate  *      operation is skipped.  "how" may be one of SIG_BLOCK,  *      SIG_UNBLOCK or SIG_SETMASK.  If this package is built  *      with USE_SIGNAL, then this routine achieves nothing. *       *      sigsuspend() sets the signal mask to "*mask" and waits  *      for a signal to be delivered after which the previous  *      mask is restored. *       *       * RETURN VALUE: *      0==success, -1==failure * * BUGS: *      Since we fake most of this, don't expect fancy usage to  *      work. * * AUTHOR: *      Simon J. Gerraty <sjg@zen.void.oz.au> */     /* COPYRIGHT: *      @(#)Copyright (c) 1992 Simon J. Gerraty * *      This is free software.  It comes with NO WARRANTY. *      Permission to use, modify and distribute this source code *      is granted subject to the following conditions. *      1/ that that the above copyright notice and this notice  *      are preserved in all copies and that due credit be given  *      to the author.   *      2/ that any changes to this code are clearly commented  *      as such so that the author does get blamed for bugs  *      other than his own. *       *      Please send copies of changes and bug-fixes to: *      sjg@zen.void.oz.au * *//* Changes to sigact.c for pdksh, Michael Rendell <michael@cs.mun.ca>: *	- sigsuspend(): pass *mask to bsd4.2 sigpause instead of mask. *	- changed SIG_HDLR to RETSIGTYPE for use with GNU autoconf *	- added and used RETSIGVAL *	- include sh.h instead of signal.h (to get *_SIGNALS macros) *	- changed if !SA_NOCLDSTOP ... to USE_FAKE_SIGACT to avoid confusion *	- set the USE_* defines using the *_SIGNALS defines from autoconf *	- sigaction(): if using BSD signals, use sigvec() (used to use *	  signal()) and set the SV_INTERRUPT flag (POSIX says syscalls *	  are interrupted and pdksh needs this behaviour). *	- define IS_KSH before including anything; ifdef out routines *	  not used in ksh if IS_KSH is defined (same in sigact.h). *	- use ARGS() instead of __P() *	- sigaction(),sigsuspend(),Signal(),signal(): use handler_t typedef *	  instead of explicit type. *//*    #include <signal.h>*/#define IS_KSH#include "sh.h"/*    #ifndef __P    # if defined(__STDC__) || defined(__cplusplus)    #   define	__P(p)	p    # else    #   define	__P(p)	()    # endif    #endif*//* * some systems have a faulty sigaction() implementation! * Allow us to bypass it. * Or they may have installed sigact.h as signal.h which is why  * we have SA_NOCLDSTOP defined. */#ifdef USE_FAKE_SIGACT /* let autoconf decide.. *//* #if !defined(SA_NOCLDSTOP) || defined(_SIGACT_H) || defined(USE_SIGNAL) || defined(USE_SIGSET) || defined(USE_SIGMASK) *//* Let autoconf decide which to use */#ifdef BSD42_SIGNALS# define USE_SIGMASK#else# ifdef BSD41_SIGNALS#  define USE_SIGSET# else#  define USE_SIGNAL# endif#endif /* BSD42_SIGNALS *//* * if we haven't been told, * try and guess what we should implement with. */#if !defined(USE_SIGSET) && !defined(USE_SIGMASK) && !defined(USE_SIGNAL)# if defined(sigmask) || defined(BSD) || defined(_BSD) && !defined(BSD41)#   define USE_SIGMASK# else#   ifndef NO_SIGSET#     define USE_SIGSET#   else#     define USE_SIGNAL#   endif# endif#endif/* * if we still don't know, we're in trouble */#if !defined(USE_SIGSET) && !defined(USE_SIGMASK) && !defined(USE_SIGNAL)error must know what to implement with#endif#include "sigact.h"/* * in case signal() has been mapped to our Signal(). */#undef signal intsigaction(sig, act, oact)  int sig;  struct sigaction *act, *oact;{  handler_t oldh;  if (act)  {#ifdef USE_SIGSET    oldh = sigset(sig, act->sa_handler);#else# ifdef USE_SIGMASK    struct sigvec nsv,osv;    nsv.sv_handler = act->sa_handler;    nsv.sv_mask = 0;			/* punt */    nsv.sv_flags = SV_INTERRUPT;	/* punt */    sigvec(sig, &nsv, &osv);    oldh = osv.sv_handler;# else /* USE_SIGMASK */    oldh = signal(sig, act->sa_handler);# endif /* USE_SIGMASK */#endif  }  else  {    if (oact)    {      #ifdef USE_SIGSET      oldh = sigset(sig, SIG_IGN);#else      oldh = signal(sig, SIG_IGN);#endif      if (oldh != SIG_IGN && oldh !=  SIG_ERR)      {#ifdef USE_SIGSET	(void) sigset(sig, oldh);#else	(void) signal(sig, oldh);#endif      }    }  }  if (oact)  {    oact->sa_handler = oldh;  }  return 0;				/* hey we're faking it */}intsigaddset(mask, sig)  sigset_t *mask;  int sig;{  *mask |= sigmask(sig);  return 0;}#ifndef IS_KSHintsigdelset(mask, sig)  sigset_t *mask;  int sig;{  *mask &= ~(sigmask(sig));  return 0;}#endif /* IS_KSH */intsigemptyset(mask)  sigset_t *mask;{  *mask = 0;  return 0;}#ifndef IS_KSHintsigfillset(mask)  sigset_t *mask;{  *mask = ~0;  return 0;}#endif /* IS_KSH */#ifndef IS_KSHintsigismember(mask, sig)  sigset_t *mask;  int sig;{  return ((*mask) & sigmask(sig));}#endif /* IS_KSH */#ifndef IS_KSHintsigpending(set)  sigset_t *set;{  return 0;				/* faking it! */}#endif /* IS_KSH */intsigprocmask(how, set, oset)  int how;  sigset_t *set, *oset;{#ifdef USE_SIGSET  register int i;#endif  static sigset_t sm;  static int once = 0;  if (!once)  {    /*     * initally we clear sm,     * there after, it represents the last     * thing we did.     */    once++;#ifdef USE_SIGMASK    sm = sigblock(0);#else    sm = 0;#endif  }    if (oset)    *oset = sm;  if (set)  {    switch (how)    {    case SIG_BLOCK:      sm |= *set;      break;    case SIG_UNBLOCK:      sm &= ~(*set);      break;    case SIG_SETMASK:      sm = *set;      break;    }#ifdef USE_SIGMASK    (void) sigsetmask(sm);#else# ifdef USE_SIGSET    for (i = 1; i < NSIG; i++)    {      if (how == SIG_UNBLOCK)      {	if (*set & sigmask(i))	  sigrelse(i);      }      else	if (sm & sigmask(i))	{	  sighold(i);	}    }# endif#endif  }  return 0;}intsigsuspend(mask)  sigset_t *mask;{#ifdef USE_SIGMASK  sigpause(*mask);#else  register int i;# ifdef USE_SIGSET  for (i = 1; i < NSIG; i++)  {    if (*mask & sigmask(i))    {      /* not the same sigpause() as above! */      sigpause(i);			      break;    }  }# else /* signal(2) only */  handler_t oldh;  /*   * make sure that signals in mask will not   * be ignored.   */  for (i = 1; i < NSIG; i++)  {    if (*mask & sigmask(i))    {      if ((oldh = signal(i, SIG_DFL)) !=  SIG_ERR &&	  oldh != SIG_IGN &&	  oldh != SIG_DFL)	(void) signal(i, oldh);		/* restore handler */    }  }  pause();				/* wait for a signal */# endif#endif  return 0;}#endif /* USE_FAKE_SIGACT (was ! SA_NOCLDSTOP) */#if !defined(RETSIGTYPE)# define RETSIGTYPE void# define RETSIGVAL#endif#if !defined(SIG_ERR)# define SIG_ERR	(RETSIGTYPE (*)())-1#endif/* * an implementation of signal() using sigaction(). */#ifndef IS_KSHhandler_t Signal(sig, handler)  int sig;  handler_t handler;{  struct sigaction act, oact;  act.sa_handler = handler;  sigemptyset(&act.sa_mask);  act.sa_flags = 0;  if (sigaction(sig, &act, &oact) < 0)    return (SIG_ERR);  return (oact.sa_handler);}#endif /* IS_KSH */#ifndef IS_KSH#if !defined(USE_SIGNAL) && !defined(USE_SIGMASK) && !defined(NO_SIGNAL)/* * ensure we avoid signal mayhem */handler_t signal(sig, handler)  int sig;  handler_t handler;{  return (Signal(sig, handler));}#endif#endif /* IS_KSH *//* This lot (for GNU-Emacs) goes at the end of the file. *//*  * Local Variables: * version-control:t * comment-column:40 * End: */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
夜夜嗨av一区二区三区中文字幕 | 91麻豆精品国产91久久久资源速度| 欧美色综合天天久久综合精品| 国产呦精品一区二区三区网站| 日精品一区二区三区| 国内精品国产成人| 欧美人与z0zoxxxx视频| 国产精品麻豆视频| 韩国在线一区二区| 制服.丝袜.亚洲.中文.综合| 亚洲欧美激情视频在线观看一区二区三区 | 日韩激情一二三区| 99精品欧美一区二区三区小说| 欧美一级高清大全免费观看| 亚洲精品国产品国语在线app| 国产福利一区二区三区视频| 精品国产乱码久久| 日韩精品色哟哟| 欧美日本韩国一区| 一级特黄大欧美久久久| 99精品黄色片免费大全| 国产午夜精品久久久久久免费视 | 亚洲综合色丁香婷婷六月图片| 风间由美性色一区二区三区| 精品国产乱码久久久久久免费 | 成人免费毛片a| 久久久久国产精品麻豆ai换脸| 日韩一区欧美二区| 欧美日韩和欧美的一区二区| 亚洲一区二区精品久久av| 91色|porny| 一区二区三区不卡在线观看| 一本一本大道香蕉久在线精品 | 日韩成人免费电影| 欧美精品国产精品| 男女视频一区二区| 精品国产一区二区三区不卡| 久久精工是国产品牌吗| 日韩欧美黄色影院| 久久不见久久见免费视频1| 日韩欧美自拍偷拍| 精品一区二区国语对白| 欧美v亚洲v综合ⅴ国产v| 精品一区二区三区在线视频| 久久综合丝袜日本网| 经典一区二区三区| 久久精品亚洲精品国产欧美kt∨| 成人免费不卡视频| 亚洲一区av在线| 制服丝袜激情欧洲亚洲| 久久er99精品| 亚洲欧洲av另类| 欧美日韩中文精品| 久久精品国产亚洲高清剧情介绍| 久久综合久色欧美综合狠狠| 成人在线视频首页| 亚洲精品国产a久久久久久| 色偷偷久久一区二区三区| 日一区二区三区| 亚洲精品一区二区三区福利| 99re热这里只有精品视频| 午夜精品久久久久| 久久亚洲私人国产精品va媚药| 不卡高清视频专区| 天天操天天色综合| 久久精品在线观看| 在线看国产日韩| 韩国精品免费视频| 一区二区在线观看免费视频播放| 日韩一区二区精品葵司在线| 成人激情免费网站| 亚洲成人动漫在线观看| 久久噜噜亚洲综合| 欧美性视频一区二区三区| 国产美女娇喘av呻吟久久| 亚洲久本草在线中文字幕| 日韩精品在线一区| 91精品国产一区二区| 欧美无乱码久久久免费午夜一区| 欧美成人激情免费网| 91丨porny丨户外露出| 日韩国产欧美在线观看| 国产精品沙发午睡系列990531| 欧美日韩视频在线第一区| 成人白浆超碰人人人人| 丝瓜av网站精品一区二区 | 欧美日韩在线播放| 成人黄色在线网站| 精品一区二区三区免费毛片爱| 一区二区在线观看不卡| 亚洲福中文字幕伊人影院| 国产亚洲成aⅴ人片在线观看| 欧美日韩一区三区| av在线综合网| 国产电影精品久久禁18| 免费观看一级欧美片| 伊人婷婷欧美激情| 亚洲色图在线看| 久久精品在线观看| 一级精品视频在线观看宜春院| 国产婷婷色一区二区三区四区| 日韩一区二区三区视频| 精品视频在线免费看| 色999日韩国产欧美一区二区| 成人永久看片免费视频天堂| 国产福利一区二区三区在线视频| 经典三级一区二区| 久久99精品一区二区三区三区| 日韩av电影天堂| 亚洲超丰满肉感bbw| 午夜在线成人av| 亚洲成人自拍偷拍| 亚洲成人激情社区| 亚洲va在线va天堂| 亚洲h动漫在线| 亚洲高清不卡在线观看| 性感美女久久精品| 日韩成人一级片| 久久91精品国产91久久小草| 久久精品国产99国产精品| 激情五月激情综合网| 久久爱另类一区二区小说| 久久精品国产一区二区三区免费看 | 久久电影网电视剧免费观看| 日韩va亚洲va欧美va久久| 日本欧美加勒比视频| 久久99精品久久久久久国产越南| 国产在线精品一区二区夜色| 国产一区二区三区久久久| 国产成人免费视频一区| 成人动漫中文字幕| 99re在线精品| 欧美日韩激情一区二区| 日韩一区二区三区视频在线观看| 欧美精品一区二区在线观看| 国产日产欧美精品一区二区三区| 成人免费一区二区三区视频 | 国产精品久久久久婷婷| 亚洲三级久久久| 色哟哟日韩精品| 欧美人妖巨大在线| 久久这里都是精品| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲男人的天堂一区二区 | 欧美精品在线观看一区二区| 欧美一级xxx| 国产欧美日韩久久| 亚洲免费观看在线观看| 男人的j进女人的j一区| 不卡一区二区在线| 7777精品伊人久久久大香线蕉最新版 | 欧美日韩一卡二卡三卡| 精品免费一区二区三区| 国产精品国产三级国产aⅴ入口 | 国产精品三级视频| 亚洲综合偷拍欧美一区色| 捆绑变态av一区二区三区| av一本久道久久综合久久鬼色| 欧美高清视频www夜色资源网| 国产亚洲视频系列| 香蕉久久夜色精品国产使用方法| 国产馆精品极品| 91精品久久久久久久久99蜜臂| 国产精品成人网| 老司机免费视频一区二区| 色网站国产精品| 国产欧美日产一区| 日日摸夜夜添夜夜添国产精品 | 精品一区二区三区久久久| 色猫猫国产区一区二在线视频| 欧美mv和日韩mv的网站| 一区二区理论电影在线观看| 成人亚洲精品久久久久软件| 欧美日韩1区2区| 亚洲四区在线观看| 国产精品一二三四| 日韩视频一区二区三区| 一区二区三区国产精品| www.亚洲精品| 国产亚洲成年网址在线观看| 久久aⅴ国产欧美74aaa| 欧美喷水一区二区| 一区二区三区不卡视频在线观看| 懂色中文一区二区在线播放| 欧美一区二区网站| 亚洲一区二区三区四区在线观看| www.亚洲人| 国产精品成人网| 福利一区在线观看| 国产欧美日产一区| 国产精品自拍三区| 亚洲精品一区二区三区精华液| 老司机精品视频导航| 日韩免费观看高清完整版在线观看| 亚洲一区二区三区四区的| 色综合久久久久综合99| 亚洲精品亚洲人成人网在线播放| 成人avav影音| 自拍偷拍亚洲欧美日韩| 一本色道久久加勒比精品|