# io.github.libtmux.PaneCommand.awaitShellStart

- **Module:** io.github.libtmux
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/851a1b7f1f9b9b2bf0fa9f578de78acd3631f33d/libtmux/src/main/java/io/github/libtmux/PaneCommand.java#L226
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-panecommand-panecommand-awaitshellstart/

```
public static boolean awaitShellStart(
        Pane pane,
        String current)
        throws InterruptedException
```

Waits for a pane that was just created to start its shell, and says whether it had to.

Between fork and exec the process in a pane's terminal is the server's own copy, so tmux
names the pane {@code tmux} until its shell starts. A read of the pane's command taken in that
window is out of date once this returns {@code true}, and has to be taken again. A pane still
named {@code tmux} after the wait is left for the caller's shell check to refuse.

## Parameters

- `pane` (`Pane`): the pane to wait for
- `current` (`String`): the command the pane was last read to be running

## Returns

whether the pane was waited for, so that {@code current} is stale

## Errors

- [`InterruptedException`](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/InterruptedException.html): if the waiting thread is interrupted
