]> Savannah Git Hosting - gnulib.git/commitdiff
tests: Don't assume that pid_t fits in an 'int'.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Aug 2020 23:22:49 +0000 (01:22 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Aug 2020 23:22:49 +0000 (01:22 +0200)
* tests/test-nonblocking-pipe-main.c (main): Use type 'pid_t' instead
of 'int'.
* tests/test-nonblocking-socket-main.c (main): Likewise.

ChangeLog
tests/test-nonblocking-pipe-main.c
tests/test-nonblocking-socket-main.c

index 9c2dcdca25a3b51e38ccf8299b23f6932dbe49d6..073f96870b4efcef326563ee0d8858da144a0ac1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2020-08-23  Bruno Haible  <bruno@clisp.org>
 
+       tests: Don't assume that pid_t fits in an 'int'.
+       * tests/test-nonblocking-pipe-main.c (main): Use type 'pid_t' instead
+       of 'int'.
+       * tests/test-nonblocking-socket-main.c (main): Likewise.
+
        sys_types: Fix definition of pid_t on 64-bit MSVC.
        * m4/pid_t.m4: New file.
        * modules/sys_types (Files): Add it.
index 0e132f0037a0cdfbb9daa6e85fd9767d49b1c5f3..ec19be5fb71cae9680332514c8f6bee4362c386c 100644 (file)
@@ -44,7 +44,7 @@ main (int argc, char *argv[])
   const char *child_path;
   int test;
   int fd[2];
-  int child;
+  pid_t child;
   int exitcode;
 
   child_path = argv[1];
index 500479de7ce0233baa648e8cdd638cec1fa59fc5..d2cf50e350f105199a52b171a16afd9ce5cf1a59 100644 (file)
@@ -47,7 +47,7 @@ main (int argc, char *argv[])
   int test;
   int server;
   int port;
-  int child;
+  pid_t child;
   int server_socket;
   int exitcode;