Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 38) 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()
234 pid_t pid; member
243 pid_t pid = -1; in notify_start() local
271 if ((pid = fork()) == -1) { in notify_start()
277 if (pid == 0) { in notify_start()
289 kill(pid, SIGTERM); in notify_start()
292 ret->pid = pid; in notify_start()
318 if (ctx == NULL || ctx->pid <= 0) { in notify_complete()
[all …]
H A Dsshlogin.c136 record_login(pid_t pid, const char *tty, const char *user, uid_t uid, in record_login() argument
144 li = login_alloc_entry(pid, user, host, tty); in record_login()
152 record_utmp_only(pid_t pid, const char *ttyname, const char *user, in record_utmp_only() argument
157 li = login_alloc_entry(pid, user, host, ttyname); in record_utmp_only()
166 record_logout(pid_t pid, const char *tty, const char *user) in record_logout() argument
170 li = login_alloc_entry(pid, user, NULL, tty); in record_logout()
H A Dssh-sk-client.c51 pid_t pid; in start_helper() local
77 if ((pid = fork()) == -1) { in start_helper()
86 if (pid == 0) { in start_helper()
104 debug3_f("started pid=%ld", (long)pid); in start_helper()
106 *pidp = pid; in start_helper()
112 reap_helper(pid_t pid) in reap_helper() argument
116 debug3_f("pid=%ld", (long)pid); in reap_helper()
119 while (waitpid(pid, &status, 0) == -1) { in reap_helper()
144 pid_t pid; in client_converse() local
150 if ((r = start_helper(&fd, &pid, &osigchld)) != 0) in client_converse()
[all …]
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.c392 pid_t pid; in do_exec_no_pty() local
517 s->pid = pid; in do_exec_no_pty()
562 pid_t pid; in do_exec_pty() local
641 s->pid = pid; in do_exec_pty()
744 pid_t pid = getpid(); in do_login() local
1796 (long)s->pid); in session_dump()
1881 if (s->used && s->pid == pid) in session_by_pid()
2150 if (s->pid <= 0) { in session_signal_req()
2279 if (s->pid != 0) in session_pty_cleanup2()
2469 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.c119 pid_t pid; in ssh_proxy_fdpass_connect() local
134 if ((pid = fork()) == 0) { in ssh_proxy_fdpass_connect()
172 if (pid == -1) in ssh_proxy_fdpass_connect()
181 while (waitpid(pid, NULL, 0) == -1) in ssh_proxy_fdpass_connect()
201 pid_t pid; in ssh_proxy_connect() local
217 if ((pid = fork()) == 0) { in ssh_proxy_connect()
254 if (pid == -1) in ssh_proxy_connect()
1558 pid_t pid; in ssh_local_cmd() local
1570 pid = fork(); in ssh_local_cmd()
1571 if (pid == 0) { in ssh_local_cmd()
[all …]
H A Dsshd.c346 pid_t pid; in main_sigchld_handler() local
352 (pid == -1 && errno == EINTR)) in main_sigchld_handler()
484 pid_t pid; in privsep_preauth() local
494 pid = fork(); in privsep_preauth()
495 if (pid == -1) { in privsep_preauth()
497 } else if (pid != 0) { in privsep_preauth()
500 pmonitor->m_pid = pid; in privsep_preauth()
1141 pid_t pid; local
1291 pid = getpid();
1306 if ((pid = fork()) == 0) {
[all …]
H A Dssh-agent.c1265 pid_t pid; in main() local
1266 char pidstrbuf[1 + 3 * sizeof pid]; in main()
1369 pid = (int)strtonum(pidstr, 2, INT_MAX, &errstr); in main()
1376 if (kill(pid, SIGTERM) == -1) { in main()
1383 printf("echo Agent pid %ld killed;\n", (long)pid); in main()
1443 pid = fork(); in main()
1444 if (pid == -1) { in main()
1448 if (pid != 0) { /* Parent - execute the given command. */ in main()
1450 snprintf(pidstrbuf, sizeof pidstrbuf, "%ld", (long)pid); in main()
1457 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 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 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()
359 } else if (pid == -1) { in do_cmd2()
362 while (waitpid(pid, &status, 0) == -1) in do_cmd2()
H A Dsession.h37 pid_t pid; member
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.c860 pid_t pid; in subprocess() local
910 switch ((pid = fork())) { in subprocess()
984 kill(pid, SIGTERM); in subprocess()
985 while (waitpid(pid, NULL, 0) == -1 && errno == EINTR) in subprocess()
990 debug3_f("%s pid %ld", tag, (long)pid); in subprocess()
993 return pid; in subprocess()
H A Dauth2-pubkey.c446 pid_t pid; in match_principals_command() local
533 if ((pid = subprocess("AuthorizedPrincipalsCommand", runas_pw, command, in match_principals_command()
546 if (exited_cleanly(pid, "AuthorizedPrincipalsCommand", command, 0) != 0) in match_principals_command()
886 pid_t pid; in user_key_command_allowed2() local
971 if ((pid = subprocess("AuthorizedKeysCommand", runas_pw, command, in user_key_command_allowed2()
985 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 …]
/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.c343 getpgid(pid_t pid) in getpgid() argument
346 return getpgrp(pid); in getpgid()
348 if (pid == 0) in getpgid()
408 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.sh327 pid=`$SUDO cat $PIDFILE`
328 if [ "X$pid" = "X" ]; then
331 if [ $pid -lt 2 ]; then
332 echo bad pid for sshd: $pid
334 $SUDO kill $pid
342 if $SUDO kill -0 $pid; then
344 "port $PORT pid $pid"
366 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 104 milliseconds

12