X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-nonblocking-socket-main.c;h=808cd50b2c809fce295937a5cfd6ba83bb27539a;hb=1276a2c5f24c0c932426aca9c899fa524d2443f2;hp=034873d5d27181b8e3d6465bd87b9519b17a8019;hpb=bce9d2f253449c62e05c030307e4d298ef914df9;p=gnulib.git diff --git a/tests/test-nonblocking-socket-main.c b/tests/test-nonblocking-socket-main.c index 034873d5d..808cd50b2 100644 --- a/tests/test-nonblocking-socket-main.c +++ b/tests/test-nonblocking-socket-main.c @@ -1,6 +1,6 @@ /* Test for nonblocking read and write on sockets. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ #include "nonblocking.h" #include "wait-process.h" +#include "progname.h" #include "macros.h" #include "socket-server.h" @@ -43,14 +44,19 @@ int main (int argc, char *argv[]) { - const char *child_path = argv[1]; - int test = atoi (argv[2]); + const char *child_path; + int test; int server; int port; int child; int server_socket; int exitcode; + set_program_name (argv[0]); + + child_path = argv[1]; + test = atoi (argv[2]); + /* Create a server socket. */ server = create_server (0, 1, &port);