pwait.c (bc02c18c486fce2ca23b428a9e89b4eb3bb48da3) pwait.c (5bdce6ff546e00673f9f515d2165d02901e858aa)
1/*-
2 * Copyright (c) 2004-2009, Jilles Tjoelker
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with
6 * or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 132 unchanged lines hidden (view full) ---

141 s += 6;
142 }
143 errno = 0;
144 pid = strtol(s, &end, 10);
145 if (pid < 0 || *end != '\0' || errno != 0) {
146 warnx("%s: bad process id", s);
147 continue;
148 }
1/*-
2 * Copyright (c) 2004-2009, Jilles Tjoelker
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with
6 * or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 132 unchanged lines hidden (view full) ---

141 s += 6;
142 }
143 errno = 0;
144 pid = strtol(s, &end, 10);
145 if (pid < 0 || *end != '\0' || errno != 0) {
146 warnx("%s: bad process id", s);
147 continue;
148 }
149 if (pid == getpid()) {
150 warnx("%s: skiping my own pid", s);
151 continue;
152 }
149 for (i = 0; i < nleft; i++) {
150 if (e[i].ident == (uintptr_t)pid) {
151 break;
152 }
153 }
154 if (i < nleft) {
155 /* Duplicate. */
156 continue;

--- 63 unchanged lines hidden ---
153 for (i = 0; i < nleft; i++) {
154 if (e[i].ident == (uintptr_t)pid) {
155 break;
156 }
157 }
158 if (i < nleft) {
159 /* Duplicate. */
160 continue;

--- 63 unchanged lines hidden ---