From 0c239bbb3a1518e0f58891259f1f73fb170ffd99 Mon Sep 17 00:00:00 2001 From: Chaskiel M Grundman Date: Wed, 23 Jan 2002 07:55:08 +0000 Subject: [PATCH] linux-afsd-ignore-signals-20020123 ignore signals sent to afsd on linux instead of running out of control also daemonize ourselves --- src/afs/afs_osi.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c index 2574096b59..b60ee4cc3d 100644 --- a/src/afs/afs_osi.c +++ b/src/afs/afs_osi.c @@ -284,33 +284,42 @@ afs_gfs_FlushText(vp) void afs_osi_Invisible() { #ifndef AFS_AIX32_ENV /* called once per "kernel" lwp to make it invisible */ +#ifdef AFS_LINUX22_ENV + spin_lock_irq(¤t->sigmask_lock); + sigfillset(¤t->blocked); + recalc_sigpending(current); + spin_unlock_irq(¤t->sigmask_lock); + + daemonize(); +#else /* AFS_LINUX22_ENV */ #ifdef AFS_DEC_ENV u.u_procp->p_type |= SSYS; -#else +#else /* AFS_DEC_ENV */ #if defined(AFS_SUN5_ENV) curproc->p_flag |= SSYS; -#else +#else /* AFS_SUN5_ENV */ #if defined(AFS_SGI_ENV) vrelvm(); -#endif +#endif /* AFS_SGI_ENV */ #ifdef AFS_SUN_ENV relvm(u.u_procp); /* release all the resources */ -#endif +#endif /* AFS_SUN_ENV */ #if defined(AFS_HPUX101_ENV) set_system_proc(u.u_procp); -#else +#else /* AFS_HPUX101_ENV */ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) /* maybe call init_process instead? */ current_proc()->p_flag |= P_SYSTEM; -#else +#else /* AFS_DARWIN_ENV || AFS_FBSD_ENV */ #if !defined(AFS_SGI64_ENV) && !defined(AFS_LINUX20_ENV) u.u_procp->p_flag |= SSYS; -#endif /* AFS_SGI64_ENV */ -#endif -#endif -#endif -#endif -#endif +#endif /* !AFS_SGI64_ENV && !AFS_LINUX20_ENV */ +#endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */ +#endif /* AFS_HPUX101_ENV */ +#endif /* AFS_SUN5_ENV */ +#endif /* AFS_DEC_ENV */ +#endif /* AFS_LINUX22_ENV */ +#endif /* AFS_AIX32_ENV */ AFS_STATCNT(osi_Invisible); }