Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 37) sorted by relevance

12

/openssh-portable/
H A Dreadpass.c53 pid_t pid, ret; in ssh_askpass() local
69 if ((pid = fork()) == -1) { in ssh_askpass()
74 if (pid == 0) { in ssh_askpass()
203 pid_t pid; member
213 pid_t pid; in notify_start() local
239 if ((pid = fork()) == -1) { in notify_start()
245 if (pid == 0) { in notify_start()
259 kill(pid, SIGTERM); in notify_start()
262 ret->pid = pid; in notify_start()
273 if (ctx == NULL || ctx->pid <= 0) { in notify_complete()
[all …]
H A Dsshlogin.c133 record_login(pid_t pid, const char *tty, const char *user, uid_t uid, in record_login() argument
141 li = login_alloc_entry(pid, user, host, tty); in record_login()
149 record_utmp_only(pid_t pid, const char *ttyname, const char *user, in record_utmp_only() argument
154 li = login_alloc_entry(pid, user, host, ttyname); in record_utmp_only()
163 record_logout(pid_t pid, const char *tty, const char *user) in record_logout() argument
167 li = login_alloc_entry(pid, user, NULL, tty); in record_logout()
H A Dloginrec.h68 pid_t pid; /* PID of login process */ member
91 struct logininfo *login_alloc_entry(pid_t pid, const char *username,
96 int login_init_entry(struct logininfo *li, pid_t pid, const char *username,
H A Dsession.c394 pid_t pid; in do_exec_no_pty() local
521 s->pid = pid; in do_exec_no_pty()
566 pid_t pid; in do_exec_pty() local
645 s->pid = pid; in do_exec_pty()
748 pid_t pid = getpid(); in do_login() local
1792 (long)s->pid); in session_dump()
1877 if (s->used && s->pid == pid) in session_by_pid()
2146 if (s->pid <= 0) { in session_signal_req()
2277 if (s->pid != 0) in session_pty_cleanup2()
2468 s->pid = 0; in session_close_by_pid()
[all …]
H A Dsandbox-systrace.c128 pid_t pid; in ssh_sandbox_parent() local
134 pid = waitpid(child_pid, &status, WUNTRACED); in ssh_sandbox_parent()
135 } while (pid == -1 && errno == EINTR); in ssh_sandbox_parent()
H A Dsshconnect.c133 pid_t pid; in ssh_proxy_fdpass_connect() local
148 if ((pid = fork()) == 0) { in ssh_proxy_fdpass_connect()
186 if (pid == -1) in ssh_proxy_fdpass_connect()
195 while (waitpid(pid, NULL, 0) == -1) in ssh_proxy_fdpass_connect()
215 pid_t pid; in ssh_proxy_connect() local
231 if ((pid = fork()) == 0) { in ssh_proxy_connect()
268 if (pid == -1) in ssh_proxy_connect()
1374 pid_t pid; in ssh_local_cmd() local
1386 pid = fork(); in ssh_local_cmd()
1387 if (pid == 0) { in ssh_local_cmd()
[all …]
H A Dsshd.c341 pid_t pid; in main_sigchld_handler() local
345 (pid == -1 && errno == EINTR)) in main_sigchld_handler()
478 pid_t pid; in privsep_preauth() local
488 pid = fork(); in privsep_preauth()
489 if (pid == -1) { in privsep_preauth()
491 } else if (pid != 0) { in privsep_preauth()
494 pmonitor->m_pid = pid; in privsep_preauth()
1050 pid_t pid; local
1212 pid = getpid();
1227 if ((pid = fork()) == 0) {
[all …]
H A Dssh-agent.c292 pid_t pid; in provider_sign() local
314 if ((pid = fork()) == -1) { in provider_sign()
320 if (pid == 0) { in provider_sign()
383 while (waitpid(pid, &status, 0) == -1) { in provider_sign()
1291 pid_t pid; in main() local
1292 char pidstrbuf[1 + 3 * sizeof pid]; in main()
1389 pid = (int)strtonum(pidstr, 2, INT_MAX, &errstr); in main()
1396 if (kill(pid, SIGTERM) == -1) { in main()
1463 pid = fork(); in main()
1464 if (pid == -1) { in main()
[all …]
H A Daudit-bsm.c260 pid_t pid = getpid(); in bsm_audit_record() local
278 pid, pid, &tid)); in bsm_audit_record()
H A Dscp.c197 pid_t pid; in do_local_cmd() local
208 if ((pid = fork()) == -1) in do_local_cmd()
211 if (pid == 0) { in do_local_cmd()
217 do_cmd_pid = pid; in do_local_cmd()
222 while (waitpid(pid, &status, 0) == -1) in do_local_cmd()
324 pid_t pid; in do_cmd2() local
337 pid = fork(); in do_cmd2()
338 if (pid == 0) { in do_cmd2()
358 } else if (pid == -1) { in do_cmd2()
361 while (waitpid(pid, &status, 0) == -1) in do_cmd2()
H A Dsession.h37 pid_t pid; member
H A Dssh-pkcs11-client.c53 static pid_t pid = -1; variable
289 if ((pid = fork()) == -1) { in pkcs11_start_helper()
292 } else if (pid == 0) { in pkcs11_start_helper()
H A Dloginrec.c344 logininfo *login_alloc_entry(pid_t pid, const char *username, in login_alloc_entry() argument
350 login_init_entry(newli, pid, username, hostname, line); in login_alloc_entry()
372 login_init_entry(struct logininfo *li, pid_t pid, const char *username, in login_init_entry() argument
379 li->pid = pid; in login_init_entry()
680 ut->ut_pid = li->pid; in construct_utmp()
763 utx->ut_pid = li->pid; in construct_utmpx()
H A Dauth.c856 pid_t pid; in subprocess() local
906 switch ((pid = fork())) { in subprocess()
980 kill(pid, SIGTERM); in subprocess()
981 while (waitpid(pid, NULL, 0) == -1 && errno == EINTR) in subprocess()
986 debug3("%s: %s pid %ld", __func__, tag, (long)pid); in subprocess()
989 return pid; in subprocess()
H A Dauth2-pubkey.c443 pid_t pid; in match_principals_command() local
530 if ((pid = subprocess("AuthorizedPrincipalsCommand", runas_pw, command, in match_principals_command()
543 if (exited_cleanly(pid, "AuthorizedPrincipalsCommand", command, 0) != 0) in match_principals_command()
883 pid_t pid; in user_key_command_allowed2() local
968 if ((pid = subprocess("AuthorizedKeysCommand", runas_pw, command, in user_key_command_allowed2()
982 if (exited_cleanly(pid, "AuthorizedKeysCommand", command, 0) != 0) in user_key_command_allowed2()
H A Dsftp.c223 pid_t pid; in killchild() local
225 pid = sshpid; in killchild()
226 if (pid > 1) { in killchild()
227 kill(pid, SIGTERM); in killchild()
228 waitpid(pid, NULL, 0); in killchild()
263 pid_t pid; in sigchld_handler() local
269 if (pid == sshpid) { in sigchld_handler()
320 pid_t pid; in local_do_shell() local
328 if ((pid = fork()) == -1) in local_do_shell()
331 if (pid == 0) { in local_do_shell()
[all …]
H A Dserverloop.c376 pid_t pid; in collect_children() local
386 while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || in collect_children()
387 (pid == -1 && errno == EINTR)) in collect_children()
388 if (pid > 0) in collect_children()
389 session_close_by_pid(ssh, pid, status); in collect_children()
/openssh-portable/openbsd-compat/
H A Dbsd-waitpid.c33 waitpid(int pid, int *stat_loc, int options) in waitpid() argument
38 if (pid <= 0) { in waitpid()
39 if (pid != -1) { in waitpid()
44 pid = 0; in waitpid()
46 wait_pid = wait4(pid, &statusp, options, NULL); in waitpid()
H A Dbsd-closefrom.c99 pid_t pid = getpid(); in closefrom() local
102 sz = proc_pidinfo(pid, PROC_PIDLISTFDS, 0, NULL, 0); in closefrom()
109 r = proc_pidinfo(pid, PROC_PIDLISTFDS, 0, fdinfo_buf, sz); in closefrom()
H A Dbsd-misc.c341 getpgid(pid_t pid) in getpgid() argument
344 return getpgrp(pid); in getpgid()
346 if (pid == 0) in getpgid()
406 getsid(pid_t pid) in getsid() argument
H A Darc4random.c146 pid_t pid = getpid(); in _rs_stir_if_needed() local
148 if (rs_count <= len || !rs_initialized || rs_stir_pid != pid) { in _rs_stir_if_needed()
149 rs_stir_pid = pid; in _rs_stir_if_needed()
H A Dport-solaris.c140 solaris_contract_post_fork_parent(pid_t pid) in solaris_contract_post_fork_parent() argument
164 if (r != 0 || pid <= 0) in solaris_contract_post_fork_parent()
/openssh-portable/regress/
H A Dtest-exec.sh313 pid=`$SUDO cat $PIDFILE`
314 if [ "X$pid" = "X" ]; then
317 if [ $pid -lt 2 ]; then
318 echo bad pid for sshd: $pid
320 $SUDO kill $pid
328 if $SUDO kill -0 $pid; then
330 "port $PORT pid $pid"
352 echo bad pid for ssh: $SSH_PID
/openssh-portable/contrib/redhat/
H A Dsshd.init26 PID_FILE=/var/run/sshd.pid
H A Dsshd.init.old29 PID_FILE=/var/run/sshd.pid

Completed in 35 milliseconds

12