Home
last modified time | relevance | path

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

12

/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-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/
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 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()
96 while ((ret = waitpid(pid, &status, 0)) == -1) in ssh_askpass()
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.c129 pid_t pid; in ssh_sandbox_parent() local
135 pid = waitpid(child_pid, &status, WUNTRACED); in ssh_sandbox_parent()
136 } while (pid == -1 && errno == EINTR); in ssh_sandbox_parent()
H A Dsshconnect.c130 pid_t pid; in ssh_proxy_fdpass_connect() local
145 if ((pid = fork()) == 0) { in ssh_proxy_fdpass_connect()
183 if (pid == -1) in ssh_proxy_fdpass_connect()
192 while (waitpid(pid, NULL, 0) == -1) in ssh_proxy_fdpass_connect()
212 pid_t pid; in ssh_proxy_connect() local
228 if ((pid = fork()) == 0) { in ssh_proxy_connect()
265 if (pid == -1) in ssh_proxy_connect()
1370 pid_t pid; in ssh_local_cmd() local
1382 pid = fork(); in ssh_local_cmd()
1383 if (pid == 0) { in ssh_local_cmd()
[all …]
H A Dsshd.c344 pid_t pid; in main_sigchld_handler() local
348 (pid == -1 && errno == EINTR)) in main_sigchld_handler()
481 pid_t pid; in privsep_preauth() local
491 pid = fork(); in privsep_preauth()
492 if (pid == -1) { in privsep_preauth()
494 } else if (pid != 0) { in privsep_preauth()
497 pmonitor->m_pid = pid; in privsep_preauth()
1053 pid_t pid; local
1212 pid = getpid();
1227 if ((pid = fork()) == 0) {
[all …]
H A Dssh-agent.c1098 pid_t pid; in main() local
1099 char pidstrbuf[1 + 3 * sizeof pid]; in main()
1194 pid = (int)strtonum(pidstr, 2, INT_MAX, &errstr); in main()
1201 if (kill(pid, SIGTERM) == -1) { in main()
1208 printf("echo Agent pid %ld killed;\n", (long)pid); in main()
1268 pid = fork(); in main()
1269 if (pid == -1) { in main()
1273 if (pid != 0) { /* Parent - execute the given command. */ in main()
1275 snprintf(pidstrbuf, sizeof pidstrbuf, "%ld", (long)pid); in main()
1282 printf("echo Agent pid %ld;\n", (long)pid); in main()
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.c195 pid_t pid; in do_local_cmd() local
206 if ((pid = fork()) == -1) in do_local_cmd()
209 if (pid == 0) { in do_local_cmd()
215 do_cmd_pid = pid; in do_local_cmd()
220 while (waitpid(pid, &status, 0) == -1) in do_local_cmd()
322 pid_t pid; in do_cmd2() local
335 pid = fork(); in do_cmd2()
336 if (pid == 0) { in do_cmd2()
356 } else if (pid == -1) { in do_cmd2()
359 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.c343 logininfo *login_alloc_entry(pid_t pid, const char *username, in login_alloc_entry() argument
349 login_init_entry(newli, pid, username, hostname, line); in login_alloc_entry()
371 login_init_entry(struct logininfo *li, pid_t pid, const char *username, in login_init_entry() argument
378 li->pid = pid; in login_init_entry()
679 ut->ut_pid = li->pid; in construct_utmp()
762 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.c418 pid_t pid; in match_principals_command() local
505 if ((pid = subprocess("AuthorizedPrincipalsCommand", runas_pw, command, in match_principals_command()
518 if (exited_cleanly(pid, "AuthorizedPrincipalsCommand", command, 0) != 0) in match_principals_command()
890 pid_t pid; in user_key_command_allowed2() local
975 if ((pid = subprocess("AuthorizedKeysCommand", runas_pw, command, in user_key_command_allowed2()
989 if (exited_cleanly(pid, "AuthorizedKeysCommand", command, 0) != 0) in user_key_command_allowed2()
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()
H A Dlogintest.c76 li->pid, li->uid, li->line, in dump_logininfo()
H A Dssh.c1544 pid_t pid; in control_persist_detach() local
1553 switch ((pid = fork())) { in control_persist_detach()
1561 debug2("%s: background process is %ld", __func__, (long)pid); in control_persist_detach()
2160 pid_t pid; in main_sigchld_handler() local
2163 while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || in main_sigchld_handler()
2164 (pid == -1 && errno == EINTR)) in main_sigchld_handler()
/openssh-portable/regress/
H A Dtest-exec.sh306 pid=`$SUDO cat $PIDFILE`
307 if [ "X$pid" = "X" ]; then
310 if [ $pid -lt 2 ]; then
311 echo bad pid for sshd: $pid
313 $SUDO kill $pid
321 if $SUDO kill -0 $pid; then
323 "port $PORT pid $pid"
345 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 55 milliseconds

12