Code:
$ truss -ap ksh -c 'date "+%Y-%m-%d" ' 2>&1|grep -v sigprocmask
[11978] execve(0x7b0f5bd0, 0x7b0f54ac, 0x7b0f54bc) ........................ [entry]
argv[0] @ 0x7b0f0009: "ksh"
argv[1] @ 0x7b0f000d: "-c"
argv[2] @ 0x7b0f0010: "date "+%Y-%m-%d" "
[11978] execve("/usr/bin/ksh", 0x7b0f54ac, 0x7b0f54bc) .................... = 0 [32-bit]
[11978] utssys(0x7b0f7860, 0, 0) .......................................... = 0
[11978] open("/usr/lib/dld.sl", O_RDONLY, 052254) ......................... = 3
[11978] read(3, "02\v010e0512@ \0E 1d0214\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0033 94\0\0\0\0".., 48) ................. = 48
[11978] mmap(NULL, 209812, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB|MAP_STATICPREDICTION, 3, 40960) = 0xc0010000
[11978] mmap(NULL, 17752, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 253952) = 0x7b0eb000
[11978] close(3) .......................................................... = 0
[11978] sysconf(_SC_CPU_VERSION) .......................................... = 532
[11978] utssys(0x7b0f7c60, 0, 0) .......................................... = 0
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0e9000
[11978] open("/opt/graphics/OpenGL/lib/libogltls.sl", O_RDONLY, 0200) ..... ERR#2 ENOENT
[11978] open("/usr/lib/libc.2", O_RDONLY, 0200) ........................... = 3
[11978] fstat(3, 0x7b0f8508) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \012e3< \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 1241088, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 290816) = 0xc0100000
[11978] mmap(NULL, 57344, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1, 0) = 0x7b0db000
[11978] mmap(0x7b0d2000, 36864, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_SHLIB, 3, 1531904) = 0x7b0d2000
[11978] mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0ce000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libdld.2", O_RDONLY, 0200) ......................... = 3
[11978] fstat(3, 0x7b0f8708) .............................................. = 0
[11978] read(3, "02\v010e0512@ \0E 1d0217\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\0) \ \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 8192) = 0xc0003000
[11978] mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 20480) = 0x7b0cd000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libxti.2", O_RDONLY, 0200) ......................... = 3
[11978] fstat(3, 0x7b0f8508) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \001D t \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 86016, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 20480) = 0xc0050000
[11978] mmap(NULL, 20480, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 106496) = 0x7b0c8000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libnsl.1", O_RDONLY, 0200) ......................... = 3
[11978] fstat(3, 0x7b0f8508) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\ac604\0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 512000, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 114688) = 0xc0080000
[11978] mmap(NULL, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1, 0) = 0x7b0c2000
[11978] mmap(0x7b0b3000, 61440, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_SHLIB, 3, 626688) = 0x7b0b3000
[11978] mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0b1000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libxti.2", O_RDONLY, 0) ............................ = 3
[11978] fstat(3, 0x7b0f8708) .............................................. = 0
[11978] close(3) .......................................................... = 0
[11978] mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0ad000
[11978] mmap(NULL, 104, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0ac000
[11978] sigsetreturn(0x7b0cfd56, 0x6211988, 1392) ......................... = 0
[11978] brk(0x40008068) ................................................... = 0
[11978] sysconf(_SC_OPEN_MAX) ............................................. = 2048
[11978] brk(0x4000a868) ................................................... = 0
[11978] brk(0x4000ec68) ................................................... = 0
[11978] close(2046) ....................................................... ERR#9 EBADF
[11978] close(2045) ....................................................... ERR#9 EBADF
[11978] close(2044) ....................................................... ERR#9 EBADF
[11978] close(2043) ....................................................... ERR#9 EBADF
[11978] close(2042) ....................................................... ERR#9 EBADF
[11978] close(2048) ....................................................... ERR#9 EBADF
[11978] close(2047) ....................................................... ERR#9 EBADF
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] time(0x40004880) .................................................. = 1294677535
[11978] sigsetreturn(0x7b0cfd56, 0x6211988, 1392) ......................... = 0
[11978] sigaction(SIGWINCH, NULL, 0x7b0f59a8) ............................. = 0
[11978] sigsetreturn(0x7b0cfd56, 0x6211988, 1392) ......................... = 0
[11978] sigvector(SIGABRT, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGALRM, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGBUS, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGCLD, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGEMT, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGFPE, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGHUP, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGILL, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGINT, 0x7b0f5a68, 0x7b0f5a78) ......................... = 0
[11978] sigvector(SIGABRT, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGPIPE, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGQUIT, 0x7b0f5a68, 0x7b0f5a78) ........................ = 0
[11978] sigvector(SIGRT8, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT7, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT6, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT5, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT1, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT2, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT3, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT4, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGSYS, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGTERM, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGTRAP, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGUSR1, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGUSR2, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGWINCH, 0x7b0f5a28, 0x7b0f5a38) ....................... = 0
[11978] sigvector(_SIGXFSZ, 0x7b0f5a68, 0x7b0f5a78) ....................... = 0
[11978] open("/usr/lib/nls/loc/locales.2/C", O_RDONLY, 0200) .............. = 3
[11978] fstat(3, 0x7b0f7e08) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\0! e0\0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\001\0\0\0 9 2 4 5 ", 12) ........................... = 12
[11978] mmap(NULL, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 4096) = 0xc0006000
[11978] mmap(NULL, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 16384) = 0x7b0a9000
[11978] close(3) .......................................................... = 0
[11978] stat("/usr/lib/nls/loc/locales.2/C", 0x7b0f7478) .................. = 0
[11978] time(NULL) ........................................................ = 1294677535
[11978] brk(0x40011868) ................................................... = 0
[11978] brk(0x40012068) ................................................... = 0
[11978] brk(0x40012868) ................................................... = 0
[11978] brk(0x40013468) ................................................... = 0
[11978] brk(0x40013c68) ................................................... = 0
[11978] brk(0x40014468) ................................................... = 0
[11978] brk(0x40014c68) ................................................... = 0
[11978] brk(0x40015468) ................................................... = 0
[11978] brk(0x40015c68) ................................................... = 0
[11978] brk(0x40016468) ................................................... = 0
[11978] brk(0x40016c68) ................................................... = 0
[11978] brk(0x40017468) ................................................... = 0
[11978] brk(0x40017c68) ................................................... = 0
[11978] brk(0x40018868) ................................................... = 0
[11978] brk(0x40019068) ................................................... = 0
[11978] stat64("/dhome1/n/nbkodln", 0x7b0f5ea0) ........................... = 0
[11978] stat64(".", 0x7b0f5f18) ........................................... = 0
[11978] sigaction(SIGWINCH, NULL, 0x7b0f59a8) ............................. = 0
[11978] getpid() .......................................................... = 11978 (11977)
[11978] getpid() .......................................................... = 11978 (11977)
[11978] brk(0x40015068) ................................................... = 0
[11978] stat("/appl/sybase/OCS-12_0.10733/bin/date", 0x7b0f5f60) .......... ERR#2 ENOENT
[11978] stat("bin/date", 0x7b0f5f60) ...................................... ERR#2 ENOENT
[11978] stat("/appl/sybase/OCS-12_0.10733/bin/date", 0x7b0f5f60) .......... ERR#2 ENOENT
[11978] stat("date", 0x7b0f5f60) .......................................... ERR#2 ENOENT
[11978] stat("/usr/bin/date", 0x7b0f5f60) ................................. = 0
[11978] getpid() .......................................................... = 11978 (11977)
[11978] sigvector(_SIGXFSZ, 0x7b0f5f68, 0x7b0f5f78) ....................... = 0
[11978] sigvector(SIGQUIT, 0x7b0f5f68, 0x7b0f5f78) ........................ = 0
[11978] brk(0x40015468) ................................................... = 0
[11978] brk(0x40015868) ................................................... = 0
[11978] execve(0x400150c6, 0x400144b8, 0x4001493c) ........................ [entry]
argv[0] @ 0x40014479: "date"
argv[1] @ 0x4001449d: "+%Y-%m-%d"
[11978] execve("/usr/bin/date", 0x400144b8, 0x4001493c) ................... = 0 [32-bit]
[11978] utssys(0x7b0f7830, 0, 0) .......................................... = 0
[11978] open("/usr/lib/dld.sl", O_RDONLY, 052170) ......................... = 3
[11978] read(3, "02\v010e0512@ \0E 1d0214\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0033 94\0\0\0\0".., 48) ................. = 48
[11978] mmap(NULL, 209812, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB|MAP_STATICPREDICTION, 3, 40960) = 0xc0010000
[11978] mmap(NULL, 17752, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 253952) = 0x7b0eb000
[11978] close(3) .......................................................... = 0
[11978] sysconf(_SC_CPU_VERSION) .......................................... = 532
[11978] utssys(0x7b0f7c30, 0, 0) .......................................... = 0
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0e9000
[11978] open("/opt/graphics/OpenGL/lib/libogltls.sl", O_RDONLY, 0200) ..... ERR#2 ENOENT
[11978] open("/usr/lib/libc.2", O_RDONLY, 0200) ........................... = 3
[11978] fstat(3, 0x7b0f84d8) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \012e3< \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 1241088, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 290816) = 0xc0100000
[11978] mmap(NULL, 57344, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1, 0) = 0x7b0db000
[11978] mmap(0x7b0d2000, 36864, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_SHLIB, 3, 1531904) = 0x7b0d2000
[11978] mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0ce000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libdld.2", O_RDONLY, 0200) ......................... = 3
[11978] fstat(3, 0x7b0f86d8) .............................................. = 0
[11978] read(3, "02\v010e0512@ \0E 1d0217\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\0) \ \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 8192) = 0xc0003000
[11978] mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 20480) = 0x7b0cd000
[11978] close(3) .......................................................... = 0
[11978] mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0c9000
[11978] mmap(NULL, 88, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0c8000
[11978] sigsetreturn(0x7b0cfd56, 0x6211988, 1392) ......................... = 0
[11978] sysconf(_SC_CPU_VERSION) .......................................... = 532
[11978] brk(0x40001558) ................................................... = 0
[11978] brk(0x4000354c) ................................................... = 0
[11978] brk(0x40004000) ................................................... = 0
[11978] open("/usr/lib/nls/loc/locales.2/C", O_RDONLY, 0200) .............. = 3
[11978] fstat(3, 0x7b0f82d8) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\0! e0\0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\001\0\0\0 9 2 4 5 ", 12) ........................... = 12
[11978] mmap(NULL, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 4096) = 0xc0006000
[11978] mmap(NULL, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 16384) = 0x7b0c5000
[11978] close(3) .......................................................... = 0
[11978] stat("/usr/lib/nls/loc/locales.2/C", 0x7b0f7948) .................. = 0
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] open("/prod1/csdsit/cs_core/200708/locale/date", O_RDONLY, 0) ..... ERR#2 ENOENT
[11978] open("/prod1/csdsit/cs_core/200708/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/cs_access/200708/locale/date", O_RDONLY, 02) .. ERR#2 ENOENT
[11978] open("/prod1/csdsit/cs_access/200708/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/csc_ghis/201006/locale/date", O_RDONLY, 01) ... ERR#2 ENOENT
[11978] open("/prod1/csdsit/csc_ghis/201006/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/csb_addrqa/200708/locale/date", O_RDONLY, 03) . ERR#2 ENOENT
[11978] open("/prod1/csdsit/csb_addrqa/200708/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/csd_mbnais/201002/locale/date", O_RDONLY, 03) . ERR#2 ENOENT
[11978] open("/prod1/csdsit/csd_mbnais/201002/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/csd_mbnacf/201011/locale/date", O_RDONLY, 03) . ERR#2 ENOENT
[11978] open("/prod1/csdsit/csd_mbnacf/201011/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/usr/lib/nls/msg/C/date.cat", O_RDONLY, 0177777) ............ = 3
[11978] fstat(3, 0x7b0f6cc8) .............................................. = 0
[11978] fcntl(3, F_SETFD, 1) .............................................. = 0
[11978] time(0x40001538) .................................................. = 1294677535
[11978] brk(0x40006000) ................................................... = 0
[11978] stat("/usr/lib/tztab", 0x7b0f5f68) ................................ = 0
[11978] open("/usr/lib/tztab", O_RDONLY, 0166460) ......................... = 5
[11978] mmap(NULL, 15912, PROT_READ, MAP_PRIVATE, 5, 0) ................... = 0x7b0c1000
[11978] close(5) .......................................................... = 0
[11978] brk(0x40008000) ................................................... = 0
[11978] ioctl(1, TCGETA, 0x7b0f6230) ...................................... ERR#25 ENOTTY
2011-01-10
[11978] write(1, "2 0 1 1 - 0 1 - 1 0 \n", 11) ............................ = 11
[11978] exit(0) ........................................................... WIFEXITED(0)
$