From 8ce3cc2142316541568be80a85cacd7f5b95208f Mon Sep 17 00:00:00 2001 From: David Levine Date: Fri, 1 Feb 2013 22:25:51 -0600 Subject: [PATCH 01/16] Use test -t 1 instead of test -w in test-pick. --- test/pick/test-pick | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pick/test-pick b/test/pick/test-pick index 07eff1ff..e1434dce 100755 --- a/test/pick/test-pick +++ b/test/pick/test-pick @@ -99,7 +99,7 @@ cat >"$expected" </dev/tty) 2>/dev/null; then +if test -t 1 && (printf '' >/dev/tty) 2>/dev/null; then # Produce no standard output if no messages match and standard # output is a tty. To test that even when run with stdout # detached, write directly to /dev/tty. Can't capture the -- 2.48.1 From c7da3c40f639483584aeff8c48a1ec26bf0ef35b Mon Sep 17 00:00:00 2001 From: David Levine Date: Fri, 1 Feb 2013 22:39:49 -0600 Subject: [PATCH 02/16] More test-ali diagnostics for Solaris. --- test/ali/test-ali | 5 +++++ test/common.sh.in | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/ali/test-ali b/test/ali/test-ali index 5546ef77..5a006999 100755 --- a/test/ali/test-ali +++ b/test/ali/test-ali @@ -19,7 +19,12 @@ fi setup_test +#### ???? temporary +ls -l ${MH_INST_DIR}$prefix/bin +echo $PATH +export PATH scan +inbox # ???? temporary +#### ???? temporary expected=$MH_TEST_DIR/$$.expected expected_err=$MH_TEST_DIR/$$.expected_err diff --git a/test/common.sh.in b/test/common.sh.in index b791a7f0..3331ee58 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -90,7 +90,7 @@ if [ -t 1 ] ; then # note \r so next update will overwrite printf '%3d%%\r' $PERC } - + progress_done () { printf '100%%\n' @@ -193,7 +193,7 @@ setup_test () # clean old test data trap "rm -rf '$MH_TEST_DIR/Mail'" 0 # setup test data - mkdir -p "$MH_TEST_DIR/Mail" || exit 1 + mkdir "$MH_TEST_DIR/Mail" || exit 1 cat > "$MH" < /dev/null + folder -create +inbox > /dev/null # create 10 basic messages for i in 1 2 3 4 5 6 7 8 9 10; do -- 2.48.1 From 27ddac6bea3a3d28ba1a28ad54a78e64d4031875 Mon Sep 17 00:00:00 2001 From: David Levine Date: Fri, 1 Feb 2013 22:52:00 -0600 Subject: [PATCH 03/16] Maybe the mkdir in setup_test() needs a -p? --- test/common.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common.sh.in b/test/common.sh.in index 3331ee58..951cb5ce 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -193,7 +193,7 @@ setup_test () # clean old test data trap "rm -rf '$MH_TEST_DIR/Mail'" 0 # setup test data - mkdir "$MH_TEST_DIR/Mail" || exit 1 + mkdir -p "$MH_TEST_DIR/Mail" || exit 1 cat > "$MH" < Date: Fri, 1 Feb 2013 23:12:09 -0600 Subject: [PATCH 04/16] Added set -x to test-ali. --- test/ali/test-ali | 1 + 1 file changed, 1 insertion(+) diff --git a/test/ali/test-ali b/test/ali/test-ali index 5a006999..d5438744 100755 --- a/test/ali/test-ali +++ b/test/ali/test-ali @@ -9,6 +9,7 @@ # -normalize, -nonormalize # ???? temporary set -e +set -x if test -z "${MH_OBJ_DIR}"; then srcdir=`dirname $0`/../.. -- 2.48.1 From 49e9f226f20711b8504584f32e0bb8323739fab8 Mon Sep 17 00:00:00 2001 From: David Levine Date: Fri, 1 Feb 2013 23:24:27 -0600 Subject: [PATCH 05/16] In setup_test(), set PATH after install. --- test/ali/test-ali | 10 +--------- test/common.sh.in | 6 ++++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/test/ali/test-ali b/test/ali/test-ali index d5438744..4079790d 100755 --- a/test/ali/test-ali +++ b/test/ali/test-ali @@ -8,8 +8,7 @@ # Not tested: # -normalize, -nonormalize -# ???? temporary set -e -set -x +set -e if test -z "${MH_OBJ_DIR}"; then srcdir=`dirname $0`/../.. @@ -20,13 +19,6 @@ fi setup_test -#### ???? temporary -ls -l ${MH_INST_DIR}$prefix/bin -echo $PATH -export PATH -scan +inbox # ???? temporary -#### ???? temporary - expected=$MH_TEST_DIR/$$.expected expected_err=$MH_TEST_DIR/$$.expected_err actual=$MH_TEST_DIR/$$.actual diff --git a/test/common.sh.in b/test/common.sh.in index 951cb5ce..a117d6fe 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -163,9 +163,8 @@ setup_test () { MH="${MH_TEST_DIR}/Mail/.mh_profile" MHMTSCONF="${MH_INST_DIR}${sysconfdir}/mts.conf" - PATH="${MH_INST_DIR}${bindir}:${PATH}" MH_LIB_DIR="${MH_INST_DIR}${auxexecdir}" - export MH MHMTSCONF MH_LIB_DIR PATH + export MH MHMTSCONF MH_LIB_DIR # # Only install once @@ -190,6 +189,9 @@ setup_test () "${MHMTSCONF}.old" >"${MHMTSCONF}" fi + PATH="${MH_INST_DIR}${bindir}:${PATH}" + export PATH + # clean old test data trap "rm -rf '$MH_TEST_DIR/Mail'" 0 # setup test data -- 2.48.1 From eee44c467bf31f198c73a51cab2f7e9d5a2ad47c Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Sat, 2 Feb 2013 00:33:51 -0500 Subject: [PATCH 06/16] Rework multibyte test so it will calculate the width of all of the Unicode characters we are using. --- test/getcwidth.c | 136 +++++++++++++++++++++------------- test/scan/test-scan-multibyte | 15 +--- 2 files changed, 90 insertions(+), 61 deletions(-) diff --git a/test/getcwidth.c b/test/getcwidth.c index f2a2ac69..59ae33e3 100644 --- a/test/getcwidth.c +++ b/test/getcwidth.c @@ -1,7 +1,7 @@ /* - * getcwidth - Get the OS's idea of the width of a combining character + * getcwidth - Get the OS's idea of the width of Unicode codepoints * - * This code is Copyright (c) 2012, by the authors of nmh. See the + * This code is Copyright (c) 2013, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ @@ -20,91 +20,127 @@ #include #endif +#ifdef MULTIBYTE_SUPPORT static void usage(char *); static void dumpwidth(void); +static void getwidth(const char *); +#endif /* MULTIBYTE_SUPPORT */ int main(int argc, char *argv[]) { +#ifndef MULTIBYTE_SUPPORT + fprintf(stderr, "Nmh was not configured with multibyte support\n"); + exit(1); +#else /* MULTIBYTE_SUPPORT */ wchar_t c; - int charlen; - char *p; - - /* - * This is the UTF-8 for "n" + U+0308 (Combining Diaeresis) - */ - - unsigned char string[] = "n\xcc\x88"; + int i; setlocale(LC_ALL, ""); - if (argc > 2) + if (argc < 2) usage(argv[0]); - if (argc == 2) { - if (strcmp(argv[1], "--dump") == 0) { + if (strcmp(argv[1], "--dump") == 0) { + if (argc == 2) { dumpwidth(); exit(0); } else { - usage(argv[0]); + fprintf(stderr, "--dump cannot be combined with " + "other arguments\n"); + exit(1); } } -#ifndef MULTIBYTE_SUPPORT - fprintf(stderr, "Nmh was not configured with multibyte support\n"); - exit(1); -#else /* MULTIBYTE_SUPPORT */ /* - * It's not clear to me that we can just call mbtowc() with a - * combining character; just to be safe, feed it in a base - * character first. + * Process each argument. If it begins with "U+", then try to + * convert it to a Unicode codepoint. Otherwise, take each + * string and get the total width */ - mbtowc(NULL, NULL, 0); - - charlen = mbtowc(&c, (char *) string, strlen((char *) string)); - - if (charlen != 1) { - fprintf(stderr, "We expected a beginning character length " - "of 1, got %d instead\n", charlen); - exit(1); - } - - p = (char *) (string + charlen); - - charlen = mbtowc(&c, p, strlen(p)); - - if (charlen != 2) { - fprintf(stderr, "We expected a multibyte character length " - "of 2, got %d instead\n", charlen); - fprintf(stderr, "Are you using a UTF-8 locale?\n"); - exit(1); + for (i = 1; i < argc; i++) { + if (strncmp(argv[i], "U+", 2) == 0) { + /* + * We're making a big assumption here that + * wchar_t represents a Unicode codepoint. + * That technically isn't valid unless the + * C compiler defines __STDC_ISO_10646__, but + * we're going to assume now that it works. + */ + errno = 0; + c = strtoul(argv[i] + 2, NULL, 16); + if (errno) { + fprintf(stderr, "Codepoint %s invalid\n", + argv[i]); + continue; + } + printf("%d\n", wcwidth(c)); + } else { + getwidth(argv[i]); + } } - printf("%d\n", wcwidth(c)); - exit(0); -#endif /* MULTIBYTE_SUPPORT */ } static void usage(char *argv0) { fprintf(stderr, "Usage: %s [--dump]\n", argv0); - fprintf(stderr, "Returns the column width of a UTF-8 combining " - "multibyte character\n"); + fprintf(stderr, " %s U+XXXX [...]\n", argv0); + fprintf(stderr, " %s utf-8-sequence [...]\n", argv0); + fprintf(stderr, "Returns the column width of a Unicode codepoint " + "or UTF-8 character sequence\n"); fprintf(stderr, "\t--dump\tDump complete width table\n"); exit(1); } +static void +getwidth(const char *string) +{ + wchar_t c; + int charlen, charleft = strlen(string); + int length = 0; + + /* + * In theory we should be able to use wcswidth(), but since we're + * testing out how the format libraries behave we'll do it a character + * at a time. + */ + + mbtowc(NULL, NULL, 0); + + while (charleft > 0) { + int clen; + + charlen = mbtowc(&c, string, charleft); + + if (charlen == 0) + break; + + if (charlen < 0) { + fprintf(stderr, "Unable to convert string \"%s\"\n", + string); + return; + } + + if ((clen = wcwidth(c)) < 0) { + fprintf(stderr, "U+%04X non-printable\n", c); + return; + } + + length += clen; + string += charlen; + charleft -= charlen; + } + + printf("%d\n", length); +} + static void dumpwidth(void) { -#ifndef MULTIBYTE_SUPPORT - fprintf(stderr, "Nmh was not configured with multibyte support\n"); - exit(1); -#else /* MULTIBYTE_SUPPORT */ wchar_t wc, low; int width, lastwidth; @@ -120,5 +156,5 @@ dumpwidth(void) width = wcwidth(wc - 1); if (width == lastwidth) printf("%04X - %04X = %d\n", low, wc - 1, width); -#endif /* MULTIBYTE_SUPPORT */ } +#endif /* MULTIBYTE_SUPPORT */ diff --git a/test/scan/test-scan-multibyte b/test/scan/test-scan-multibyte index 3acd1ca1..92900a90 100755 --- a/test/scan/test-scan-multibyte +++ b/test/scan/test-scan-multibyte @@ -47,7 +47,7 @@ Subject: =?utf-8?q?Sp=C4=B1n=CC=88al_Tap_=E2=86=92_Tap_into_America!?= Things are looking great! EOF -width=`${MH_OBJ_DIR}/test/getcwidth` +width=`${MH_OBJ_DIR}/test/getcwidth "st→n̈"` if test $? -ne 0; then echo "getcwidth failed to run" exit 1 @@ -56,28 +56,21 @@ fi expected="$MH_TEST_DIR/$$.expected" actual="$MH_TEST_DIR/$$.actual" -if test "$width" -eq 1; then +if test "$width" -eq 4; then cat > "$expected" < "$expected" < $actual || exit 1 -set -x -oldfailed="${failed:-0}" check "$expected" "$actual" -if test "$oldfailed" -ne "${failed:-0}"; then - echo "Complete UTF-8 width table for BMP" - ${MH_OBJ_DIR}/test/getcwidth --dump -fi -set +x # # Check decoding with an invalid multibyte sequence. We skip this test -- 2.48.1 From 8505e4e08c289ecd1b5d948c92e627d46749d583 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Sat, 2 Feb 2013 00:48:54 -0500 Subject: [PATCH 07/16] Handle the case where (on Solaris) the width of U+2019 is 2 (which seems TOTALLY bizarre to me, but there you have it). --- test/scan/test-scan-multibyte | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/test/scan/test-scan-multibyte b/test/scan/test-scan-multibyte index 92900a90..98dd9a26 100755 --- a/test/scan/test-scan-multibyte +++ b/test/scan/test-scan-multibyte @@ -47,7 +47,7 @@ Subject: =?utf-8?q?Sp=C4=B1n=CC=88al_Tap_=E2=86=92_Tap_into_America!?= Things are looking great! EOF -width=`${MH_OBJ_DIR}/test/getcwidth "st→n̈"` +width=`${MH_OBJ_DIR}/test/getcwidth "→n̈"` if test $? -ne 0; then echo "getcwidth failed to run" exit 1 @@ -56,11 +56,11 @@ fi expected="$MH_TEST_DIR/$$.expected" actual="$MH_TEST_DIR/$$.actual" -if test "$width" -eq 4; then +if test "$width" -eq 3; then cat > "$expected" < "$expected" <"$expected" <"$expected" <"$expected" <"$actual" check "$expected" "$actual" -- 2.48.1 From 352808aa57a14f23c612cb9e9e272a5e996c65e1 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Sat, 2 Feb 2013 01:10:06 -0500 Subject: [PATCH 08/16] Convert post over to use new argsplit code. --- uip/post.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uip/post.c b/uip/post.c index 7bed6f8a..59c3fbda 100644 --- a/uip/post.c +++ b/uip/post.c @@ -1284,9 +1284,9 @@ make_bcc_file (int dashstuff) { int fd, i; pid_t child_id; - char *vec[6]; + char **vec; FILE *out; - char *tfile = NULL; + char *tfile = NULL, *program; tfile = m_mktemp2(NULL, "bccs", NULL, &out); if (tfile == NULL) adios("bcc", "unable to create temporary file"); @@ -1349,7 +1349,7 @@ make_bcc_file (int dashstuff) case OK: dup2 (fileno (out), 1); - i = 1; + vec = argsplit(mhlproc, &program, &i); vec[i++] = "-forward"; vec[i++] = "-form"; vec[i++] = filter; @@ -1362,7 +1362,7 @@ make_bcc_file (int dashstuff) vec[i++] = "-nodashstuffing"; vec[i] = NULL; - execvp (mhlproc, vec); + execvp (program, vec); fprintf (stderr, "unable to exec "); perror (mhlproc); _exit (-1); -- 2.48.1 From 9fd378ee98b5dd25bebd8184eea22c9da649808f Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 2 Feb 2013 08:15:15 -0600 Subject: [PATCH 09/16] Added temporary probe to test-mhmail. --- test/mhmail/test-mhmail | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 144a362e..19374cef 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -38,6 +38,8 @@ test_mhmail () # Message-ID. # +echo $actual >&2; tail -n 2 $actual >&2 # ???? temporary + sed -e 's/^Date:.*/Date:/' \ -e 's/^Resent-Date:.*/Resent-Date:/' \ -e 's/^Message-ID:.*/Message-ID:/' "$actual" > "$actual".nodate -- 2.48.1 From c47ba3479d8defef597649215a579309b20f795e Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 2 Feb 2013 08:26:43 -0600 Subject: [PATCH 10/16] Modified test-mhmail probe. --- test/mhmail/test-mhmail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 19374cef..13d7ba8a 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -38,7 +38,7 @@ test_mhmail () # Message-ID. # -echo $actual >&2; tail -n 2 $actual >&2 # ???? temporary +ls -l $actual >&2 # ???? temporary sed -e 's/^Date:.*/Date:/' \ -e 's/^Resent-Date:.*/Resent-Date:/' \ -- 2.48.1 From 2a31b7f1964ed170812235ddf9470bcfa76b8088 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 2 Feb 2013 08:43:32 -0600 Subject: [PATCH 11/16] More test-mhmail probing. --- test/mhmail/test-mhmail | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 13d7ba8a..5db39928 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -39,6 +39,8 @@ test_mhmail () # ls -l $actual >&2 # ???? temporary +tail -n 2 $actual +echo '' >>$actual sed -e 's/^Date:.*/Date:/' \ -e 's/^Resent-Date:.*/Resent-Date:/' \ -- 2.48.1 From cc8630bbb299b1107e0bf5874f52c75b4c19b8c4 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 2 Feb 2013 09:23:49 -0600 Subject: [PATCH 12/16] Try this test-mhmail probe. --- test/mhmail/test-mhmail | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 5db39928..43f4cc71 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -39,8 +39,9 @@ test_mhmail () # ls -l $actual >&2 # ???? temporary -tail -n 2 $actual -echo '' >>$actual +echo actual: +cat $actual +echo end of actual sed -e 's/^Date:.*/Date:/' \ -e 's/^Resent-Date:.*/Resent-Date:/' \ -- 2.48.1 From 4bf2f9df237a4ff9cf449abaae0e444d74981dfa Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 2 Feb 2013 09:58:20 -0600 Subject: [PATCH 13/16] More test-mhmail probing. --- test/mhmail/test-mhmail | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 43f4cc71..1f21e638 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -39,13 +39,12 @@ test_mhmail () # ls -l $actual >&2 # ???? temporary -echo actual: -cat $actual -echo end of actual +od -t a $actual | tail -n 4 sed -e 's/^Date:.*/Date:/' \ -e 's/^Resent-Date:.*/Resent-Date:/' \ -e 's/^Message-ID:.*/Message-ID:/' "$actual" > "$actual".nodate +echo after sed # ???? temporary rm -f "$actual" check "$actual".nodate "$1" -- 2.48.1 From 12bf24b49f290ba3581add8407aa21a618db296a Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 2 Feb 2013 09:59:28 -0600 Subject: [PATCH 14/16] Set MHTMPDIR to try to keep all test-related files together. --- test/common.sh.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/common.sh.in b/test/common.sh.in index a117d6fe..2264d469 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -21,9 +21,13 @@ export MULTIBYTE_ENABLED ICONV_ENABLED test -z "$MH_INST_DIR" && MH_INST_DIR="${MH_TEST_DIR}/inst" export MH_INST_DIR -unset MHBUILD MHCONTEXT MHMTSUSERCONF MHN MHSHOW MHSTORE MHTMPDIR +unset MHBUILD MHCONTEXT MHMTSUSERCONF MHN MHSHOW MHSTORE unset MHLDEBUG MHPDEBUG MHWDEBUG MM_CHARSET PAGER +#### Use a test dir for tmp files when MHTMPDIR applies. +MHTMPDIR=$MH_TEST_DIR/Mail +export MHTMPDIR + output_md5() { #### Output just the checksum. If the filename needs to appear on @@ -189,6 +193,7 @@ setup_test () "${MHMTSCONF}.old" >"${MHMTSCONF}" fi + #### On Solaris, must set PATH after the install! PATH="${MH_INST_DIR}${bindir}:${PATH}" export PATH -- 2.48.1 From b62b8df32ba9e6b6ed4787d0621c64cb6ac59c83 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 2 Feb 2013 10:12:57 -0600 Subject: [PATCH 15/16] Added trailing newline to sed input in mhmail when processing -headerfield argument, to squelch complain from Solaris sed. --- test/mhmail/test-mhmail | 4 ---- uip/mhmail | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 1f21e638..144a362e 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -38,13 +38,9 @@ test_mhmail () # Message-ID. # -ls -l $actual >&2 # ???? temporary -od -t a $actual | tail -n 4 - sed -e 's/^Date:.*/Date:/' \ -e 's/^Resent-Date:.*/Resent-Date:/' \ -e 's/^Message-ID:.*/Message-ID:/' "$actual" > "$actual".nodate -echo after sed # ???? temporary rm -f "$actual" check "$actual".nodate "$1" diff --git a/uip/mhmail b/uip/mhmail index 2fbedccb..839b82a7 100755 --- a/uip/mhmail +++ b/uip/mhmail @@ -160,7 +160,8 @@ for arg in "$@"; do #### It's not strictly necessary to have one space after #### the : that separates the header field name from the #### body, but do it to avoid surprising someone. - add=`printf %s "$arg" | sed -e 's/:/: /' -e 's/: /: /'` + #### Solaris sed wants the trailing newline in its input. + add=`printf '%s\n' "$arg" | sed -e 's/:/: /' -e 's/: /: /'` headerfieldlist="${headerfieldlist:+$headerfieldlist}$add " headerfieldarg=0 -- 2.48.1 From 985e7f782e2acf014ecde7893530f5183de65861 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 2 Feb 2013 10:18:24 -0600 Subject: [PATCH 16/16] Removed unused vec[0] relic from before argsplit conversion. --- uip/post.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/uip/post.c b/uip/post.c index 59c3fbda..69fb74e6 100644 --- a/uip/post.c +++ b/uip/post.c @@ -1338,8 +1338,6 @@ make_bcc_file (int dashstuff) * of MIME encapsulation. */ if (filter != NULL) { - vec[0] = r1bindex (mhlproc, '/'); - for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) sleep (5); switch (child_id) { -- 2.48.1