sl@0: /* sl@0: * tclPosixStr.c -- sl@0: * sl@0: * This file contains procedures that generate strings sl@0: * corresponding to various POSIX-related codes, such sl@0: * as errno and signals. sl@0: * sl@0: * Copyright (c) 1991-1994 The Regents of the University of California. sl@0: * Copyright (c) 1994-1996 Sun Microsystems, Inc. sl@0: * Portions Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiaries. All rights reserved. sl@0: * sl@0: * See the file "license.terms" for information on usage and redistribution sl@0: * of this file, and for a DISCLAIMER OF ALL WARRANTIES. sl@0: * sl@0: * RCS: @(#) $Id: tclPosixStr.c,v 1.9 2002/05/27 10:14:21 dkf Exp $ sl@0: */ sl@0: sl@0: #include "tclInt.h" sl@0: #include "tclPort.h" sl@0: sl@0: /* sl@0: *---------------------------------------------------------------------- sl@0: * sl@0: * Tcl_ErrnoId -- sl@0: * sl@0: * Return a textual identifier for the current errno value. sl@0: * sl@0: * Results: sl@0: * This procedure returns a machine-readable textual identifier sl@0: * that corresponds to the current errno value (e.g. "EPERM"). sl@0: * The identifier is the same as the #define name in errno.h. sl@0: * sl@0: * Side effects: sl@0: * None. sl@0: * sl@0: *---------------------------------------------------------------------- sl@0: */ sl@0: sl@0: EXPORT_C CONST char * sl@0: Tcl_ErrnoId() sl@0: { sl@0: switch (errno) { sl@0: #ifdef E2BIG sl@0: case E2BIG: return "E2BIG"; sl@0: #endif sl@0: #ifdef EACCES sl@0: case EACCES: return "EACCES"; sl@0: #endif sl@0: #ifdef EADDRINUSE sl@0: case EADDRINUSE: return "EADDRINUSE"; sl@0: #endif sl@0: #ifdef EADDRNOTAVAIL sl@0: case EADDRNOTAVAIL: return "EADDRNOTAVAIL"; sl@0: #endif sl@0: #ifdef EADV sl@0: case EADV: return "EADV"; sl@0: #endif sl@0: #ifdef EAFNOSUPPORT sl@0: case EAFNOSUPPORT: return "EAFNOSUPPORT"; sl@0: #endif sl@0: #ifdef EAGAIN sl@0: case EAGAIN: return "EAGAIN"; sl@0: #endif sl@0: #ifdef EALIGN sl@0: case EALIGN: return "EALIGN"; sl@0: #endif sl@0: #if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY )) sl@0: case EALREADY: return "EALREADY"; sl@0: #endif sl@0: #ifdef EBADE sl@0: case EBADE: return "EBADE"; sl@0: #endif sl@0: #ifdef EBADF sl@0: case EBADF: return "EBADF"; sl@0: #endif sl@0: #ifdef EBADFD sl@0: case EBADFD: return "EBADFD"; sl@0: #endif sl@0: #ifdef EBADMSG sl@0: case EBADMSG: return "EBADMSG"; sl@0: #endif sl@0: #ifdef EBADR sl@0: case EBADR: return "EBADR"; sl@0: #endif sl@0: #ifdef EBADRPC sl@0: case EBADRPC: return "EBADRPC"; sl@0: #endif sl@0: #ifdef EBADRQC sl@0: case EBADRQC: return "EBADRQC"; sl@0: #endif sl@0: #ifdef EBADSLT sl@0: case EBADSLT: return "EBADSLT"; sl@0: #endif sl@0: #ifdef EBFONT sl@0: case EBFONT: return "EBFONT"; sl@0: #endif sl@0: #ifdef EBUSY sl@0: case EBUSY: return "EBUSY"; sl@0: #endif sl@0: #ifdef ECHILD sl@0: case ECHILD: return "ECHILD"; sl@0: #endif sl@0: #ifdef ECHRNG sl@0: case ECHRNG: return "ECHRNG"; sl@0: #endif sl@0: #ifdef ECOMM sl@0: case ECOMM: return "ECOMM"; sl@0: #endif sl@0: #ifdef ECONNABORTED sl@0: case ECONNABORTED: return "ECONNABORTED"; sl@0: #endif sl@0: #ifdef ECONNREFUSED sl@0: case ECONNREFUSED: return "ECONNREFUSED"; sl@0: #endif sl@0: #ifdef ECONNRESET sl@0: case ECONNRESET: return "ECONNRESET"; sl@0: #endif sl@0: #if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK)) sl@0: case EDEADLK: return "EDEADLK"; sl@0: #endif sl@0: #if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK)) sl@0: case EDEADLOCK: return "EDEADLOCK"; sl@0: #endif sl@0: #ifdef EDESTADDRREQ sl@0: case EDESTADDRREQ: return "EDESTADDRREQ"; sl@0: #endif sl@0: #ifdef EDIRTY sl@0: case EDIRTY: return "EDIRTY"; sl@0: #endif sl@0: #ifdef EDOM sl@0: case EDOM: return "EDOM"; sl@0: #endif sl@0: #ifdef EDOTDOT sl@0: case EDOTDOT: return "EDOTDOT"; sl@0: #endif sl@0: #ifdef EDQUOT sl@0: case EDQUOT: return "EDQUOT"; sl@0: #endif sl@0: #ifdef EDUPPKG sl@0: case EDUPPKG: return "EDUPPKG"; sl@0: #endif sl@0: #ifdef EEXIST sl@0: case EEXIST: return "EEXIST"; sl@0: #endif sl@0: #ifdef EFAULT sl@0: case EFAULT: return "EFAULT"; sl@0: #endif sl@0: #ifdef EFBIG sl@0: case EFBIG: return "EFBIG"; sl@0: #endif sl@0: #ifdef EHOSTDOWN sl@0: case EHOSTDOWN: return "EHOSTDOWN"; sl@0: #endif sl@0: #ifdef EHOSTUNREACH sl@0: case EHOSTUNREACH: return "EHOSTUNREACH"; sl@0: #endif sl@0: #if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS)) sl@0: case EIDRM: return "EIDRM"; sl@0: #endif sl@0: #ifdef EINIT sl@0: case EINIT: return "EINIT"; sl@0: #endif sl@0: #ifdef EINPROGRESS sl@0: case EINPROGRESS: return "EINPROGRESS"; sl@0: #endif sl@0: #ifdef EINTR sl@0: case EINTR: return "EINTR"; sl@0: #endif sl@0: #ifdef EINVAL sl@0: case EINVAL: return "EINVAL"; sl@0: #endif sl@0: #ifdef EIO sl@0: case EIO: return "EIO"; sl@0: #endif sl@0: #ifdef EISCONN sl@0: case EISCONN: return "EISCONN"; sl@0: #endif sl@0: #ifdef EISDIR sl@0: case EISDIR: return "EISDIR"; sl@0: #endif sl@0: #ifdef EISNAME sl@0: case EISNAM: return "EISNAM"; sl@0: #endif sl@0: #ifdef ELBIN sl@0: case ELBIN: return "ELBIN"; sl@0: #endif sl@0: #ifdef EL2HLT sl@0: case EL2HLT: return "EL2HLT"; sl@0: #endif sl@0: #ifdef EL2NSYNC sl@0: case EL2NSYNC: return "EL2NSYNC"; sl@0: #endif sl@0: #ifdef EL3HLT sl@0: case EL3HLT: return "EL3HLT"; sl@0: #endif sl@0: #ifdef EL3RST sl@0: case EL3RST: return "EL3RST"; sl@0: #endif sl@0: #ifdef ELIBACC sl@0: case ELIBACC: return "ELIBACC"; sl@0: #endif sl@0: #ifdef ELIBBAD sl@0: case ELIBBAD: return "ELIBBAD"; sl@0: #endif sl@0: #ifdef ELIBEXEC sl@0: case ELIBEXEC: return "ELIBEXEC"; sl@0: #endif sl@0: #ifdef ELIBMAX sl@0: case ELIBMAX: return "ELIBMAX"; sl@0: #endif sl@0: #ifdef ELIBSCN sl@0: case ELIBSCN: return "ELIBSCN"; sl@0: #endif sl@0: #ifdef ELNRNG sl@0: case ELNRNG: return "ELNRNG"; sl@0: #endif sl@0: #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT)) sl@0: case ELOOP: return "ELOOP"; sl@0: #endif sl@0: #ifdef EMFILE sl@0: case EMFILE: return "EMFILE"; sl@0: #endif sl@0: #ifdef EMLINK sl@0: case EMLINK: return "EMLINK"; sl@0: #endif sl@0: #ifdef EMSGSIZE sl@0: case EMSGSIZE: return "EMSGSIZE"; sl@0: #endif sl@0: #ifdef EMULTIHOP sl@0: case EMULTIHOP: return "EMULTIHOP"; sl@0: #endif sl@0: #ifdef ENAMETOOLONG sl@0: case ENAMETOOLONG: return "ENAMETOOLONG"; sl@0: #endif sl@0: #ifdef ENAVAIL sl@0: case ENAVAIL: return "ENAVAIL"; sl@0: #endif sl@0: #ifdef ENET sl@0: case ENET: return "ENET"; sl@0: #endif sl@0: #ifdef ENETDOWN sl@0: case ENETDOWN: return "ENETDOWN"; sl@0: #endif sl@0: #ifdef ENETRESET sl@0: case ENETRESET: return "ENETRESET"; sl@0: #endif sl@0: #ifdef ENETUNREACH sl@0: case ENETUNREACH: return "ENETUNREACH"; sl@0: #endif sl@0: #ifdef ENFILE sl@0: case ENFILE: return "ENFILE"; sl@0: #endif sl@0: #ifdef ENOANO sl@0: case ENOANO: return "ENOANO"; sl@0: #endif sl@0: #if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR)) sl@0: case ENOBUFS: return "ENOBUFS"; sl@0: #endif sl@0: #ifdef ENOCSI sl@0: case ENOCSI: return "ENOCSI"; sl@0: #endif sl@0: #if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED)) sl@0: case ENODATA: return "ENODATA"; sl@0: #endif sl@0: #ifdef ENODEV sl@0: case ENODEV: return "ENODEV"; sl@0: #endif sl@0: #ifdef ENOENT sl@0: case ENOENT: return "ENOENT"; sl@0: #endif sl@0: #ifdef ENOEXEC sl@0: case ENOEXEC: return "ENOEXEC"; sl@0: #endif sl@0: #ifdef ENOLCK sl@0: case ENOLCK: return "ENOLCK"; sl@0: #endif sl@0: #ifdef ENOLINK sl@0: case ENOLINK: return "ENOLINK"; sl@0: #endif sl@0: #ifdef ENOMEM sl@0: case ENOMEM: return "ENOMEM"; sl@0: #endif sl@0: #ifdef ENOMSG sl@0: case ENOMSG: return "ENOMSG"; sl@0: #endif sl@0: #ifdef ENONET sl@0: case ENONET: return "ENONET"; sl@0: #endif sl@0: #ifdef ENOPKG sl@0: case ENOPKG: return "ENOPKG"; sl@0: #endif sl@0: #ifdef ENOPROTOOPT sl@0: case ENOPROTOOPT: return "ENOPROTOOPT"; sl@0: #endif sl@0: #ifdef ENOSPC sl@0: case ENOSPC: return "ENOSPC"; sl@0: #endif sl@0: #if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR)) sl@0: case ENOSR: return "ENOSR"; sl@0: #endif sl@0: #if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR)) sl@0: case ENOSTR: return "ENOSTR"; sl@0: #endif sl@0: #ifdef ENOSYM sl@0: case ENOSYM: return "ENOSYM"; sl@0: #endif sl@0: #ifdef ENOSYS sl@0: case ENOSYS: return "ENOSYS"; sl@0: #endif sl@0: #ifdef ENOTBLK sl@0: case ENOTBLK: return "ENOTBLK"; sl@0: #endif sl@0: #ifdef ENOTCONN sl@0: case ENOTCONN: return "ENOTCONN"; sl@0: #endif sl@0: #ifdef ENOTDIR sl@0: case ENOTDIR: return "ENOTDIR"; sl@0: #endif sl@0: #if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST)) sl@0: case ENOTEMPTY: return "ENOTEMPTY"; sl@0: #endif sl@0: #ifdef ENOTNAM sl@0: case ENOTNAM: return "ENOTNAM"; sl@0: #endif sl@0: #ifdef ENOTSOCK sl@0: case ENOTSOCK: return "ENOTSOCK"; sl@0: #endif sl@0: #ifdef ENOTSUP sl@0: case ENOTSUP: return "ENOTSUP"; sl@0: #endif sl@0: #ifdef ENOTTY sl@0: case ENOTTY: return "ENOTTY"; sl@0: #endif sl@0: #ifdef ENOTUNIQ sl@0: case ENOTUNIQ: return "ENOTUNIQ"; sl@0: #endif sl@0: #ifdef ENXIO sl@0: case ENXIO: return "ENXIO"; sl@0: #endif sl@0: #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) sl@0: case EOPNOTSUPP: return "EOPNOTSUPP"; sl@0: #endif sl@0: #if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) && ( !defined(EINVAL) || (EOVERFLOW != EINVAL) ) sl@0: case EOVERFLOW: return "EOVERFLOW"; sl@0: #endif sl@0: #ifdef EPERM sl@0: case EPERM: return "EPERM"; sl@0: #endif sl@0: #if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT)) sl@0: case EPFNOSUPPORT: return "EPFNOSUPPORT"; sl@0: #endif sl@0: #ifdef EPIPE sl@0: case EPIPE: return "EPIPE"; sl@0: #endif sl@0: #ifdef EPROCLIM sl@0: case EPROCLIM: return "EPROCLIM"; sl@0: #endif sl@0: #ifdef EPROCUNAVAIL sl@0: case EPROCUNAVAIL: return "EPROCUNAVAIL"; sl@0: #endif sl@0: #ifdef EPROGMISMATCH sl@0: case EPROGMISMATCH: return "EPROGMISMATCH"; sl@0: #endif sl@0: #ifdef EPROGUNAVAIL sl@0: case EPROGUNAVAIL: return "EPROGUNAVAIL"; sl@0: #endif sl@0: #ifdef EPROTO sl@0: case EPROTO: return "EPROTO"; sl@0: #endif sl@0: #ifdef EPROTONOSUPPORT sl@0: case EPROTONOSUPPORT: return "EPROTONOSUPPORT"; sl@0: #endif sl@0: #ifdef EPROTOTYPE sl@0: case EPROTOTYPE: return "EPROTOTYPE"; sl@0: #endif sl@0: #ifdef ERANGE sl@0: case ERANGE: return "ERANGE"; sl@0: #endif sl@0: #if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED)) sl@0: case EREFUSED: return "EREFUSED"; sl@0: #endif sl@0: #ifdef EREMCHG sl@0: case EREMCHG: return "EREMCHG"; sl@0: #endif sl@0: #ifdef EREMDEV sl@0: case EREMDEV: return "EREMDEV"; sl@0: #endif sl@0: #ifdef EREMOTE sl@0: case EREMOTE: return "EREMOTE"; sl@0: #endif sl@0: #ifdef EREMOTEIO sl@0: case EREMOTEIO: return "EREMOTEIO"; sl@0: #endif sl@0: #ifdef EREMOTERELEASE sl@0: case EREMOTERELEASE: return "EREMOTERELEASE"; sl@0: #endif sl@0: #ifdef EROFS sl@0: case EROFS: return "EROFS"; sl@0: #endif sl@0: #ifdef ERPCMISMATCH sl@0: case ERPCMISMATCH: return "ERPCMISMATCH"; sl@0: #endif sl@0: #ifdef ERREMOTE sl@0: case ERREMOTE: return "ERREMOTE"; sl@0: #endif sl@0: #ifdef ESHUTDOWN sl@0: case ESHUTDOWN: return "ESHUTDOWN"; sl@0: #endif sl@0: #ifdef ESOCKTNOSUPPORT sl@0: case ESOCKTNOSUPPORT: return "ESOCKTNOSUPPORT"; sl@0: #endif sl@0: #ifdef ESPIPE sl@0: case ESPIPE: return "ESPIPE"; sl@0: #endif sl@0: #ifdef ESRCH sl@0: case ESRCH: return "ESRCH"; sl@0: #endif sl@0: #ifdef ESRMNT sl@0: case ESRMNT: return "ESRMNT"; sl@0: #endif sl@0: #ifdef ESTALE sl@0: case ESTALE: return "ESTALE"; sl@0: #endif sl@0: #ifdef ESUCCESS sl@0: case ESUCCESS: return "ESUCCESS"; sl@0: #endif sl@0: #if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP)) sl@0: case ETIME: return "ETIME"; sl@0: #endif sl@0: #if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR)) sl@0: case ETIMEDOUT: return "ETIMEDOUT"; sl@0: #endif sl@0: #ifdef ETOOMANYREFS sl@0: case ETOOMANYREFS: return "ETOOMANYREFS"; sl@0: #endif sl@0: #ifdef ETXTBSY sl@0: case ETXTBSY: return "ETXTBSY"; sl@0: #endif sl@0: #ifdef EUCLEAN sl@0: case EUCLEAN: return "EUCLEAN"; sl@0: #endif sl@0: #ifdef EUNATCH sl@0: case EUNATCH: return "EUNATCH"; sl@0: #endif sl@0: #ifdef EUSERS sl@0: case EUSERS: return "EUSERS"; sl@0: #endif sl@0: #ifdef EVERSION sl@0: case EVERSION: return "EVERSION"; sl@0: #endif sl@0: #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN)) sl@0: case EWOULDBLOCK: return "EWOULDBLOCK"; sl@0: #endif sl@0: #ifdef EXDEV sl@0: case EXDEV: return "EXDEV"; sl@0: #endif sl@0: #ifdef EXFULL sl@0: case EXFULL: return "EXFULL"; sl@0: #endif sl@0: } sl@0: return "unknown error"; sl@0: } sl@0: sl@0: /* sl@0: *---------------------------------------------------------------------- sl@0: * sl@0: * Tcl_ErrnoMsg -- sl@0: * sl@0: * Return a human-readable message corresponding to a given sl@0: * errno value. sl@0: * sl@0: * Results: sl@0: * The return value is the standard POSIX error message for sl@0: * errno. This procedure is used instead of strerror because sl@0: * strerror returns slightly different values on different sl@0: * machines (e.g. different capitalizations), which cause sl@0: * problems for things such as regression tests. This procedure sl@0: * provides messages for most standard errors, then it calls sl@0: * strerror for things it doesn't understand. sl@0: * sl@0: * Side effects: sl@0: * None. sl@0: * sl@0: *---------------------------------------------------------------------- sl@0: */ sl@0: sl@0: EXPORT_C CONST char * sl@0: Tcl_ErrnoMsg(err) sl@0: int err; /* Error number (such as in errno variable). */ sl@0: { sl@0: switch (err) { sl@0: #ifdef E2BIG sl@0: case E2BIG: return "argument list too long"; sl@0: #endif sl@0: #ifdef EACCES sl@0: case EACCES: return "permission denied"; sl@0: #endif sl@0: #ifdef EADDRINUSE sl@0: case EADDRINUSE: return "address already in use"; sl@0: #endif sl@0: #ifdef EADDRNOTAVAIL sl@0: case EADDRNOTAVAIL: return "can't assign requested address"; sl@0: #endif sl@0: #ifdef EADV sl@0: case EADV: return "advertise error"; sl@0: #endif sl@0: #ifdef EAFNOSUPPORT sl@0: case EAFNOSUPPORT: return "address family not supported by protocol family"; sl@0: #endif sl@0: #ifdef EAGAIN sl@0: case EAGAIN: return "resource temporarily unavailable"; sl@0: #endif sl@0: #ifdef EALIGN sl@0: case EALIGN: return "EALIGN"; sl@0: #endif sl@0: #if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY )) sl@0: case EALREADY: return "operation already in progress"; sl@0: #endif sl@0: #ifdef EBADE sl@0: case EBADE: return "bad exchange descriptor"; sl@0: #endif sl@0: #ifdef EBADF sl@0: case EBADF: return "bad file number"; sl@0: #endif sl@0: #ifdef EBADFD sl@0: case EBADFD: return "file descriptor in bad state"; sl@0: #endif sl@0: #ifdef EBADMSG sl@0: case EBADMSG: return "not a data message"; sl@0: #endif sl@0: #ifdef EBADR sl@0: case EBADR: return "bad request descriptor"; sl@0: #endif sl@0: #ifdef EBADRPC sl@0: case EBADRPC: return "RPC structure is bad"; sl@0: #endif sl@0: #ifdef EBADRQC sl@0: case EBADRQC: return "bad request code"; sl@0: #endif sl@0: #ifdef EBADSLT sl@0: case EBADSLT: return "invalid slot"; sl@0: #endif sl@0: #ifdef EBFONT sl@0: case EBFONT: return "bad font file format"; sl@0: #endif sl@0: #ifdef EBUSY sl@0: case EBUSY: return "file busy"; sl@0: #endif sl@0: #ifdef ECHILD sl@0: case ECHILD: return "no children"; sl@0: #endif sl@0: #ifdef ECHRNG sl@0: case ECHRNG: return "channel number out of range"; sl@0: #endif sl@0: #ifdef ECOMM sl@0: case ECOMM: return "communication error on send"; sl@0: #endif sl@0: #ifdef ECONNABORTED sl@0: case ECONNABORTED: return "software caused connection abort"; sl@0: #endif sl@0: #ifdef ECONNREFUSED sl@0: case ECONNREFUSED: return "connection refused"; sl@0: #endif sl@0: #ifdef ECONNRESET sl@0: case ECONNRESET: return "connection reset by peer"; sl@0: #endif sl@0: #if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK)) sl@0: case EDEADLK: return "resource deadlock avoided"; sl@0: #endif sl@0: #if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK)) sl@0: case EDEADLOCK: return "resource deadlock avoided"; sl@0: #endif sl@0: #ifdef EDESTADDRREQ sl@0: case EDESTADDRREQ: return "destination address required"; sl@0: #endif sl@0: #ifdef EDIRTY sl@0: case EDIRTY: return "mounting a dirty fs w/o force"; sl@0: #endif sl@0: #ifdef EDOM sl@0: case EDOM: return "math argument out of range"; sl@0: #endif sl@0: #ifdef EDOTDOT sl@0: case EDOTDOT: return "cross mount point"; sl@0: #endif sl@0: #ifdef EDQUOT sl@0: case EDQUOT: return "disk quota exceeded"; sl@0: #endif sl@0: #ifdef EDUPPKG sl@0: case EDUPPKG: return "duplicate package name"; sl@0: #endif sl@0: #ifdef EEXIST sl@0: case EEXIST: return "file already exists"; sl@0: #endif sl@0: #ifdef EFAULT sl@0: case EFAULT: return "bad address in system call argument"; sl@0: #endif sl@0: #ifdef EFBIG sl@0: case EFBIG: return "file too large"; sl@0: #endif sl@0: #ifdef EHOSTDOWN sl@0: case EHOSTDOWN: return "host is down"; sl@0: #endif sl@0: #ifdef EHOSTUNREACH sl@0: case EHOSTUNREACH: return "host is unreachable"; sl@0: #endif sl@0: #if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS)) sl@0: case EIDRM: return "identifier removed"; sl@0: #endif sl@0: #ifdef EINIT sl@0: case EINIT: return "initialization error"; sl@0: #endif sl@0: #ifdef EINPROGRESS sl@0: case EINPROGRESS: return "operation now in progress"; sl@0: #endif sl@0: #ifdef EINTR sl@0: case EINTR: return "interrupted system call"; sl@0: #endif sl@0: #ifdef EINVAL sl@0: case EINVAL: return "invalid argument"; sl@0: #endif sl@0: #ifdef EIO sl@0: case EIO: return "I/O error"; sl@0: #endif sl@0: #ifdef EISCONN sl@0: case EISCONN: return "socket is already connected"; sl@0: #endif sl@0: #ifdef EISDIR sl@0: case EISDIR: return "illegal operation on a directory"; sl@0: #endif sl@0: #ifdef EISNAME sl@0: case EISNAM: return "is a name file"; sl@0: #endif sl@0: #ifdef ELBIN sl@0: case ELBIN: return "ELBIN"; sl@0: #endif sl@0: #ifdef EL2HLT sl@0: case EL2HLT: return "level 2 halted"; sl@0: #endif sl@0: #ifdef EL2NSYNC sl@0: case EL2NSYNC: return "level 2 not synchronized"; sl@0: #endif sl@0: #ifdef EL3HLT sl@0: case EL3HLT: return "level 3 halted"; sl@0: #endif sl@0: #ifdef EL3RST sl@0: case EL3RST: return "level 3 reset"; sl@0: #endif sl@0: #ifdef ELIBACC sl@0: case ELIBACC: return "can not access a needed shared library"; sl@0: #endif sl@0: #ifdef ELIBBAD sl@0: case ELIBBAD: return "accessing a corrupted shared library"; sl@0: #endif sl@0: #ifdef ELIBEXEC sl@0: case ELIBEXEC: return "can not exec a shared library directly"; sl@0: #endif sl@0: #ifdef ELIBMAX sl@0: case ELIBMAX: return sl@0: "attempting to link in more shared libraries than system limit"; sl@0: #endif sl@0: #ifdef ELIBSCN sl@0: case ELIBSCN: return ".lib section in a.out corrupted"; sl@0: #endif sl@0: #ifdef ELNRNG sl@0: case ELNRNG: return "link number out of range"; sl@0: #endif sl@0: #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT)) sl@0: case ELOOP: return "too many levels of symbolic links"; sl@0: #endif sl@0: #ifdef EMFILE sl@0: case EMFILE: return "too many open files"; sl@0: #endif sl@0: #ifdef EMLINK sl@0: case EMLINK: return "too many links"; sl@0: #endif sl@0: #ifdef EMSGSIZE sl@0: case EMSGSIZE: return "message too long"; sl@0: #endif sl@0: #ifdef EMULTIHOP sl@0: case EMULTIHOP: return "multihop attempted"; sl@0: #endif sl@0: #ifdef ENAMETOOLONG sl@0: case ENAMETOOLONG: return "file name too long"; sl@0: #endif sl@0: #ifdef ENAVAIL sl@0: case ENAVAIL: return "not available"; sl@0: #endif sl@0: #ifdef ENET sl@0: case ENET: return "ENET"; sl@0: #endif sl@0: #ifdef ENETDOWN sl@0: case ENETDOWN: return "network is down"; sl@0: #endif sl@0: #ifdef ENETRESET sl@0: case ENETRESET: return "network dropped connection on reset"; sl@0: #endif sl@0: #ifdef ENETUNREACH sl@0: case ENETUNREACH: return "network is unreachable"; sl@0: #endif sl@0: #ifdef ENFILE sl@0: case ENFILE: return "file table overflow"; sl@0: #endif sl@0: #ifdef ENOANO sl@0: case ENOANO: return "anode table overflow"; sl@0: #endif sl@0: #if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR)) sl@0: case ENOBUFS: return "no buffer space available"; sl@0: #endif sl@0: #ifdef ENOCSI sl@0: case ENOCSI: return "no CSI structure available"; sl@0: #endif sl@0: #if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED)) sl@0: case ENODATA: return "no data available"; sl@0: #endif sl@0: #ifdef ENODEV sl@0: case ENODEV: return "no such device"; sl@0: #endif sl@0: #ifdef ENOENT sl@0: case ENOENT: return "no such file or directory"; sl@0: #endif sl@0: #ifdef ENOEXEC sl@0: case ENOEXEC: return "exec format error"; sl@0: #endif sl@0: #ifdef ENOLCK sl@0: case ENOLCK: return "no locks available"; sl@0: #endif sl@0: #ifdef ENOLINK sl@0: case ENOLINK: return "link has be severed"; sl@0: #endif sl@0: #ifdef ENOMEM sl@0: case ENOMEM: return "not enough memory"; sl@0: #endif sl@0: #ifdef ENOMSG sl@0: case ENOMSG: return "no message of desired type"; sl@0: #endif sl@0: #ifdef ENONET sl@0: case ENONET: return "machine is not on the network"; sl@0: #endif sl@0: #ifdef ENOPKG sl@0: case ENOPKG: return "package not installed"; sl@0: #endif sl@0: #ifdef ENOPROTOOPT sl@0: case ENOPROTOOPT: return "bad protocol option"; sl@0: #endif sl@0: #ifdef ENOSPC sl@0: case ENOSPC: return "no space left on device"; sl@0: #endif sl@0: #if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR)) sl@0: case ENOSR: return "out of stream resources"; sl@0: #endif sl@0: #if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR)) sl@0: case ENOSTR: return "not a stream device"; sl@0: #endif sl@0: #ifdef ENOSYM sl@0: case ENOSYM: return "unresolved symbol name"; sl@0: #endif sl@0: #ifdef ENOSYS sl@0: case ENOSYS: return "function not implemented"; sl@0: #endif sl@0: #ifdef ENOTBLK sl@0: case ENOTBLK: return "block device required"; sl@0: #endif sl@0: #ifdef ENOTCONN sl@0: case ENOTCONN: return "socket is not connected"; sl@0: #endif sl@0: #ifdef ENOTDIR sl@0: case ENOTDIR: return "not a directory"; sl@0: #endif sl@0: #if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST)) sl@0: case ENOTEMPTY: return "directory not empty"; sl@0: #endif sl@0: #ifdef ENOTNAM sl@0: case ENOTNAM: return "not a name file"; sl@0: #endif sl@0: #ifdef ENOTSOCK sl@0: case ENOTSOCK: return "socket operation on non-socket"; sl@0: #endif sl@0: #ifdef ENOTSUP sl@0: case ENOTSUP: return "operation not supported"; sl@0: #endif sl@0: #ifdef ENOTTY sl@0: case ENOTTY: return "inappropriate device for ioctl"; sl@0: #endif sl@0: #ifdef ENOTUNIQ sl@0: case ENOTUNIQ: return "name not unique on network"; sl@0: #endif sl@0: #ifdef ENXIO sl@0: case ENXIO: return "no such device or address"; sl@0: #endif sl@0: #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) sl@0: case EOPNOTSUPP: return "operation not supported on socket"; sl@0: #endif sl@0: #if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) && ( !defined(EINVAL) || (EOVERFLOW != EINVAL) ) sl@0: case EOVERFLOW: return "file too big"; sl@0: #endif sl@0: #ifdef EPERM sl@0: case EPERM: return "not owner"; sl@0: #endif sl@0: #if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT)) sl@0: case EPFNOSUPPORT: return "protocol family not supported"; sl@0: #endif sl@0: #ifdef EPIPE sl@0: case EPIPE: return "broken pipe"; sl@0: #endif sl@0: #ifdef EPROCLIM sl@0: case EPROCLIM: return "too many processes"; sl@0: #endif sl@0: #ifdef EPROCUNAVAIL sl@0: case EPROCUNAVAIL: return "bad procedure for program"; sl@0: #endif sl@0: #ifdef EPROGMISMATCH sl@0: case EPROGMISMATCH: return "program version wrong"; sl@0: #endif sl@0: #ifdef EPROGUNAVAIL sl@0: case EPROGUNAVAIL: return "RPC program not available"; sl@0: #endif sl@0: #ifdef EPROTO sl@0: case EPROTO: return "protocol error"; sl@0: #endif sl@0: #ifdef EPROTONOSUPPORT sl@0: case EPROTONOSUPPORT: return "protocol not suppored"; sl@0: #endif sl@0: #ifdef EPROTOTYPE sl@0: case EPROTOTYPE: return "protocol wrong type for socket"; sl@0: #endif sl@0: #ifdef ERANGE sl@0: case ERANGE: return "math result unrepresentable"; sl@0: #endif sl@0: #if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED)) sl@0: case EREFUSED: return "EREFUSED"; sl@0: #endif sl@0: #ifdef EREMCHG sl@0: case EREMCHG: return "remote address changed"; sl@0: #endif sl@0: #ifdef EREMDEV sl@0: case EREMDEV: return "remote device"; sl@0: #endif sl@0: #ifdef EREMOTE sl@0: case EREMOTE: return "pathname hit remote file system"; sl@0: #endif sl@0: #ifdef EREMOTEIO sl@0: case EREMOTEIO: return "remote i/o error"; sl@0: #endif sl@0: #ifdef EREMOTERELEASE sl@0: case EREMOTERELEASE: return "EREMOTERELEASE"; sl@0: #endif sl@0: #ifdef EROFS sl@0: case EROFS: return "read-only file system"; sl@0: #endif sl@0: #ifdef ERPCMISMATCH sl@0: case ERPCMISMATCH: return "RPC version is wrong"; sl@0: #endif sl@0: #ifdef ERREMOTE sl@0: case ERREMOTE: return "object is remote"; sl@0: #endif sl@0: #ifdef ESHUTDOWN sl@0: case ESHUTDOWN: return "can't send afer socket shutdown"; sl@0: #endif sl@0: #ifdef ESOCKTNOSUPPORT sl@0: case ESOCKTNOSUPPORT: return "socket type not supported"; sl@0: #endif sl@0: #ifdef ESPIPE sl@0: case ESPIPE: return "invalid seek"; sl@0: #endif sl@0: #ifdef ESRCH sl@0: case ESRCH: return "no such process"; sl@0: #endif sl@0: #ifdef ESRMNT sl@0: case ESRMNT: return "srmount error"; sl@0: #endif sl@0: #ifdef ESTALE sl@0: case ESTALE: return "stale remote file handle"; sl@0: #endif sl@0: #ifdef ESUCCESS sl@0: case ESUCCESS: return "Error 0"; sl@0: #endif sl@0: #if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP)) sl@0: case ETIME: return "timer expired"; sl@0: #endif sl@0: #if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR)) sl@0: case ETIMEDOUT: return "connection timed out"; sl@0: #endif sl@0: #ifdef ETOOMANYREFS sl@0: case ETOOMANYREFS: return "too many references: can't splice"; sl@0: #endif sl@0: #ifdef ETXTBSY sl@0: case ETXTBSY: return "text file or pseudo-device busy"; sl@0: #endif sl@0: #ifdef EUCLEAN sl@0: case EUCLEAN: return "structure needs cleaning"; sl@0: #endif sl@0: #ifdef EUNATCH sl@0: case EUNATCH: return "protocol driver not attached"; sl@0: #endif sl@0: #ifdef EUSERS sl@0: case EUSERS: return "too many users"; sl@0: #endif sl@0: #ifdef EVERSION sl@0: case EVERSION: return "version mismatch"; sl@0: #endif sl@0: #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN)) sl@0: case EWOULDBLOCK: return "operation would block"; sl@0: #endif sl@0: #ifdef EXDEV sl@0: case EXDEV: return "cross-domain link"; sl@0: #endif sl@0: #ifdef EXFULL sl@0: case EXFULL: return "message tables full"; sl@0: #endif sl@0: default: sl@0: #ifdef NO_STRERROR sl@0: return "unknown POSIX error"; sl@0: #else sl@0: return strerror(errno); sl@0: #endif sl@0: } sl@0: } sl@0: sl@0: /* sl@0: *---------------------------------------------------------------------- sl@0: * sl@0: * Tcl_SignalId -- sl@0: * sl@0: * Return a textual identifier for a signal number. sl@0: * sl@0: * Results: sl@0: * This procedure returns a machine-readable textual identifier sl@0: * that corresponds to sig. The identifier is the same as the sl@0: * #define name in signal.h. sl@0: * sl@0: * Side effects: sl@0: * None. sl@0: * sl@0: *---------------------------------------------------------------------- sl@0: */ sl@0: sl@0: EXPORT_C CONST char * sl@0: Tcl_SignalId(sig) sl@0: int sig; /* Number of signal. */ sl@0: { sl@0: switch (sig) { sl@0: #ifdef SIGABRT sl@0: case SIGABRT: return "SIGABRT"; sl@0: #endif sl@0: #ifdef SIGALRM sl@0: case SIGALRM: return "SIGALRM"; sl@0: #endif sl@0: #ifdef SIGBUS sl@0: case SIGBUS: return "SIGBUS"; sl@0: #endif sl@0: #ifdef SIGCHLD sl@0: case SIGCHLD: return "SIGCHLD"; sl@0: #endif sl@0: #if defined(SIGCLD) && (!defined(SIGCHLD) || (SIGCLD != SIGCHLD)) sl@0: case SIGCLD: return "SIGCLD"; sl@0: #endif sl@0: #ifdef SIGCONT sl@0: case SIGCONT: return "SIGCONT"; sl@0: #endif sl@0: #if defined(SIGEMT) && (!defined(SIGXCPU) || (SIGEMT != SIGXCPU)) sl@0: case SIGEMT: return "SIGEMT"; sl@0: #endif sl@0: #ifdef SIGFPE sl@0: case SIGFPE: return "SIGFPE"; sl@0: #endif sl@0: #ifdef SIGHUP sl@0: case SIGHUP: return "SIGHUP"; sl@0: #endif sl@0: #ifdef SIGILL sl@0: case SIGILL: return "SIGILL"; sl@0: #endif sl@0: #ifdef SIGINT sl@0: case SIGINT: return "SIGINT"; sl@0: #endif sl@0: #ifdef SIGIO sl@0: case SIGIO: return "SIGIO"; sl@0: #endif sl@0: #if defined(SIGIOT) && (!defined(SIGABRT) || (SIGIOT != SIGABRT)) sl@0: case SIGIOT: return "SIGIOT"; sl@0: #endif sl@0: #ifdef SIGKILL sl@0: case SIGKILL: return "SIGKILL"; sl@0: #endif sl@0: #if defined(SIGLOST) && (!defined(SIGIOT) || (SIGLOST != SIGIOT)) && (!defined(SIGURG) || (SIGLOST != SIGURG)) && (!defined(SIGPROF) || (SIGLOST != SIGPROF)) && (!defined(SIGIO) || (SIGLOST != SIGIO)) sl@0: case SIGLOST: return "SIGLOST"; sl@0: #endif sl@0: #ifdef SIGPIPE sl@0: case SIGPIPE: return "SIGPIPE"; sl@0: #endif sl@0: #if defined(SIGPOLL) && (!defined(SIGIO) || (SIGPOLL != SIGIO)) sl@0: case SIGPOLL: return "SIGPOLL"; sl@0: #endif sl@0: #ifdef SIGPROF sl@0: case SIGPROF: return "SIGPROF"; sl@0: #endif sl@0: #if defined(SIGPWR) && (!defined(SIGXFSZ) || (SIGPWR != SIGXFSZ)) && (!defined(SIGLOST) || (SIGPWR != SIGLOST)) sl@0: case SIGPWR: return "SIGPWR"; sl@0: #endif sl@0: #ifdef SIGQUIT sl@0: case SIGQUIT: return "SIGQUIT"; sl@0: #endif sl@0: #ifdef SIGSEGV sl@0: case SIGSEGV: return "SIGSEGV"; sl@0: #endif sl@0: #ifdef SIGSTOP sl@0: case SIGSTOP: return "SIGSTOP"; sl@0: #endif sl@0: #ifdef SIGSYS sl@0: case SIGSYS: return "SIGSYS"; sl@0: #endif sl@0: #ifdef SIGTERM sl@0: case SIGTERM: return "SIGTERM"; sl@0: #endif sl@0: #ifdef SIGTRAP sl@0: case SIGTRAP: return "SIGTRAP"; sl@0: #endif sl@0: #ifdef SIGTSTP sl@0: case SIGTSTP: return "SIGTSTP"; sl@0: #endif sl@0: #ifdef SIGTTIN sl@0: case SIGTTIN: return "SIGTTIN"; sl@0: #endif sl@0: #ifdef SIGTTOU sl@0: case SIGTTOU: return "SIGTTOU"; sl@0: #endif sl@0: #if defined(SIGURG) && (!defined(SIGIO) || (SIGURG != SIGIO)) sl@0: case SIGURG: return "SIGURG"; sl@0: #endif sl@0: #if defined(SIGUSR1) && (!defined(SIGIO) || (SIGUSR1 != SIGIO)) sl@0: case SIGUSR1: return "SIGUSR1"; sl@0: #endif sl@0: #if defined(SIGUSR2) && (!defined(SIGURG) || (SIGUSR2 != SIGURG)) sl@0: case SIGUSR2: return "SIGUSR2"; sl@0: #endif sl@0: #ifdef SIGVTALRM sl@0: case SIGVTALRM: return "SIGVTALRM"; sl@0: #endif sl@0: #ifdef SIGWINCH sl@0: case SIGWINCH: return "SIGWINCH"; sl@0: #endif sl@0: #ifdef SIGXCPU sl@0: case SIGXCPU: return "SIGXCPU"; sl@0: #endif sl@0: #ifdef SIGXFSZ sl@0: case SIGXFSZ: return "SIGXFSZ"; sl@0: #endif sl@0: } sl@0: return "unknown signal"; sl@0: } sl@0: sl@0: /* sl@0: *---------------------------------------------------------------------- sl@0: * sl@0: * Tcl_SignalMsg -- sl@0: * sl@0: * Return a human-readable message describing a signal. sl@0: * sl@0: * Results: sl@0: * This procedure returns a string describing sig that should sl@0: * make sense to a human. It may not be easy for a machine sl@0: * to parse. sl@0: * sl@0: * Side effects: sl@0: * None. sl@0: * sl@0: *---------------------------------------------------------------------- sl@0: */ sl@0: sl@0: EXPORT_C CONST char * sl@0: Tcl_SignalMsg(sig) sl@0: int sig; /* Number of signal. */ sl@0: { sl@0: switch (sig) { sl@0: #ifdef SIGABRT sl@0: case SIGABRT: return "SIGABRT"; sl@0: #endif sl@0: #ifdef SIGALRM sl@0: case SIGALRM: return "alarm clock"; sl@0: #endif sl@0: #ifdef SIGBUS sl@0: case SIGBUS: return "bus error"; sl@0: #endif sl@0: #ifdef SIGCHLD sl@0: case SIGCHLD: return "child status changed"; sl@0: #endif sl@0: #if defined(SIGCLD) && (!defined(SIGCHLD) || (SIGCLD != SIGCHLD)) sl@0: case SIGCLD: return "child status changed"; sl@0: #endif sl@0: #ifdef SIGCONT sl@0: case SIGCONT: return "continue after stop"; sl@0: #endif sl@0: #if defined(SIGEMT) && (!defined(SIGXCPU) || (SIGEMT != SIGXCPU)) sl@0: case SIGEMT: return "EMT instruction"; sl@0: #endif sl@0: #ifdef SIGFPE sl@0: case SIGFPE: return "floating-point exception"; sl@0: #endif sl@0: #ifdef SIGHUP sl@0: case SIGHUP: return "hangup"; sl@0: #endif sl@0: #ifdef SIGILL sl@0: case SIGILL: return "illegal instruction"; sl@0: #endif sl@0: #ifdef SIGINT sl@0: case SIGINT: return "interrupt"; sl@0: #endif sl@0: #ifdef SIGIO sl@0: case SIGIO: return "input/output possible on file"; sl@0: #endif sl@0: #if defined(SIGIOT) && (!defined(SIGABRT) || (SIGABRT != SIGIOT)) sl@0: case SIGIOT: return "IOT instruction"; sl@0: #endif sl@0: #ifdef SIGKILL sl@0: case SIGKILL: return "kill signal"; sl@0: #endif sl@0: #if defined(SIGLOST) && (!defined(SIGIOT) || (SIGLOST != SIGIOT)) && (!defined(SIGURG) || (SIGLOST != SIGURG)) && (!defined(SIGPROF) || (SIGLOST != SIGPROF)) && (!defined(SIGIO) || (SIGLOST != SIGIO)) sl@0: case SIGLOST: return "resource lost"; sl@0: #endif sl@0: #ifdef SIGPIPE sl@0: case SIGPIPE: return "write on pipe with no readers"; sl@0: #endif sl@0: #if defined(SIGPOLL) && (!defined(SIGIO) || (SIGPOLL != SIGIO)) sl@0: case SIGPOLL: return "input/output possible on file"; sl@0: #endif sl@0: #ifdef SIGPROF sl@0: case SIGPROF: return "profiling alarm"; sl@0: #endif sl@0: #if defined(SIGPWR) && (!defined(SIGXFSZ) || (SIGPWR != SIGXFSZ)) && (!defined(SIGLOST) || (SIGPWR != SIGLOST)) sl@0: case SIGPWR: return "power-fail restart"; sl@0: #endif sl@0: #ifdef SIGQUIT sl@0: case SIGQUIT: return "quit signal"; sl@0: #endif sl@0: #ifdef SIGSEGV sl@0: case SIGSEGV: return "segmentation violation"; sl@0: #endif sl@0: #ifdef SIGSTOP sl@0: case SIGSTOP: return "stop"; sl@0: #endif sl@0: #ifdef SIGSYS sl@0: case SIGSYS: return "bad argument to system call"; sl@0: #endif sl@0: #ifdef SIGTERM sl@0: case SIGTERM: return "software termination signal"; sl@0: #endif sl@0: #ifdef SIGTRAP sl@0: case SIGTRAP: return "trace trap"; sl@0: #endif sl@0: #ifdef SIGTSTP sl@0: case SIGTSTP: return "stop signal from tty"; sl@0: #endif sl@0: #ifdef SIGTTIN sl@0: case SIGTTIN: return "background tty read"; sl@0: #endif sl@0: #ifdef SIGTTOU sl@0: case SIGTTOU: return "background tty write"; sl@0: #endif sl@0: #if defined(SIGURG) && (!defined(SIGIO) || (SIGURG != SIGIO)) sl@0: case SIGURG: return "urgent I/O condition"; sl@0: #endif sl@0: #if defined(SIGUSR1) && (!defined(SIGIO) || (SIGUSR1 != SIGIO)) sl@0: case SIGUSR1: return "user-defined signal 1"; sl@0: #endif sl@0: #if defined(SIGUSR2) && (!defined(SIGURG) || (SIGUSR2 != SIGURG)) sl@0: case SIGUSR2: return "user-defined signal 2"; sl@0: #endif sl@0: #ifdef SIGVTALRM sl@0: case SIGVTALRM: return "virtual time alarm"; sl@0: #endif sl@0: #ifdef SIGWINCH sl@0: case SIGWINCH: return "window changed"; sl@0: #endif sl@0: #ifdef SIGXCPU sl@0: case SIGXCPU: return "exceeded CPU time limit"; sl@0: #endif sl@0: #ifdef SIGXFSZ sl@0: case SIGXFSZ: return "exceeded file size limit"; sl@0: #endif sl@0: } sl@0: return "unknown signal"; sl@0: }