mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fix bad assertion warning about disowned jobs that don't get their proper pgroup
Running echo foo | vim - gets us in a weird situation because we put the job in fish's process groups. It causes us to not set a PGID for this job, so it can't be resumed among other things. Stopping the job with ctrl-z and try to exit the shell causes a crash in the "There are still jobs active" warning because the PID for the job is still 0. Let's remove the assertion to restore previous behavior, and hopefully fix this later.
This commit is contained in:
parent
fd61bad946
commit
8d20bbfcd7
1 changed files with 1 additions and 3 deletions
|
@ -615,13 +615,11 @@ impl Process {
|
|||
Default::default()
|
||||
}
|
||||
|
||||
/// Retrieves the associated [`libc::pid_t`] or panics if no pid has been set (not yet set or
|
||||
/// process does not get a pid).
|
||||
/// Retrieves the associated [`libc::pid_t`], 0 if unset.
|
||||
///
|
||||
/// See [`Process::has_pid()]` to safely check if the process has a pid.
|
||||
pub fn pid(&self) -> libc::pid_t {
|
||||
let value = self.pid.load(Ordering::Relaxed);
|
||||
assert!(value != 0, "Process::pid() called but pid not set!");
|
||||
#[allow(clippy::useless_conversion)]
|
||||
value.into()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue