… | |
… | |
39 | client (); |
39 | client (); |
40 | }; |
40 | }; |
41 | |
41 | |
42 | client::client () |
42 | client::client () |
43 | { |
43 | { |
44 | if ((fd = socket (PF_UNIX, SOCK_STREAM, 0)) < 0) |
44 | if ((fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) |
45 | { |
45 | { |
46 | perror ("unable to create communications socket"); |
46 | perror ("unable to create communications socket"); |
47 | exit (EXIT_FAILURE); |
47 | exit (EXIT_FAILURE); |
48 | } |
48 | } |
49 | |
49 | |
… | |
… | |
119 | } |
119 | } |
120 | } |
120 | } |
121 | else if (!strcmp (tok, "END")) |
121 | else if (!strcmp (tok, "END")) |
122 | { |
122 | { |
123 | int success; |
123 | int success; |
|
|
124 | |
124 | if (c.recv (success)) |
125 | if (c.recv (success)) |
125 | exit (success ? EXIT_SUCCESS : EXIT_FAILURE); |
126 | exit (success ? EXIT_SUCCESS : EXIT_FAILURE); |
126 | } |
127 | } |
127 | else |
128 | else |
128 | { |
129 | { |