Check if the index is in use and fail before creating the child process,

rather than leaving a stray child on failure.
This commit is contained in:
Nicholas Marriott
2011-01-25 22:31:50 +00:00
parent 1df3355438
commit 1270f8fed8
3 changed files with 34 additions and 13 deletions

3
tmux.h
View File

@ -1828,7 +1828,8 @@ struct winlink *winlink_find_by_index(struct winlinks *, int);
struct winlink *winlink_find_by_window(struct winlinks *, struct window *);
int winlink_next_index(struct winlinks *, int);
u_int winlink_count(struct winlinks *);
struct winlink *winlink_add(struct winlinks *, struct window *, int);
struct winlink *winlink_add(struct winlinks *, int);
void winlink_set_window(struct winlink *, struct window *);
void winlink_remove(struct winlinks *, struct winlink *);
struct winlink *winlink_next(struct winlink *);
struct winlink *winlink_previous(struct winlink *);