Lines Matching defs:sessp

149 static int isctty_sp(proc_t p, struct tty  *tp, struct session *sessp);
346 struct session *sessp, *oldsess;
361 sessp = proc_session(p);
367 if (SESS_LEADER(p, sessp) && /* the process is the session leader */
368 sessp->s_ttyvp == NULL && /* but has no controlling tty */
370 session_lock(sessp);
371 if ((sessp->s_flags & S_NOCTTY) == 0) { /* and no O_NOCTTY */
372 oldtp = sessp->s_ttyp;
374 sessp->s_ttyp = tp;
376 session_unlock(sessp);
382 tp->t_session = sessp;
384 sessp->s_ttypgrpid = pg->pg_id;
397 session_unlock(sessp);
402 if (sessp != SESSION_NULL)
403 session_rele(sessp);
1057 struct session *sessp, *oldsessp;
1389 sessp = proc_session(p);
1390 if (!SESS_LEADER(p, sessp) ||
1391 ((sessp->s_ttyvp || tp->t_session) &&
1392 (tp->t_session != sessp))) {
1395 if (sessp != SESSION_NULL)
1396 session_rele(sessp);
1408 /* do not drop refs on sessp and pg as tp holds them */
1409 tp->t_session = sessp;
1410 sessp->s_ttypgrpid = pg->pg_id;
1413 session_lock(sessp);
1414 oldtp = sessp->s_ttyp;
1416 sessp->s_ttyp = tp;
1417 session_unlock(sessp);
1434 sessp = proc_session(p);
1435 if (!isctty_sp(p, tp, sessp)) {
1436 if (sessp != SESSION_NULL)
1437 session_rele(sessp);
1442 if (sessp != SESSION_NULL)
1443 session_rele(sessp);
1446 } else if (pgrp->pg_session != sessp) {
1449 if (sessp != SESSION_NULL)
1450 session_rele(sessp);
1459 sessp->s_ttypgrpid = pgrp->pg_id;
1465 if (sessp != SESSION_NULL)
1466 session_rele(sessp);
3126 struct session * sessp;
3128 sessp = proc_session(p);
3129 retval = (sessp == tp->t_session && p->p_flag & P_CONTROLT);
3130 session_rele(sessp);
3135 isctty_sp(proc_t p, struct tty *tp, struct session *sessp)
3137 return(sessp == tp->t_session && p->p_flag & P_CONTROLT);