mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-15 08:12:46 +02:00
Better error messages for fork.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-split-window.c,v 1.7 2009-01-21 19:38:51 nicm Exp $ */
|
||||
/* $Id: cmd-split-window.c,v 1.8 2009-01-23 16:59:14 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -140,8 +140,7 @@ cmd_split_window_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
struct window *w;
|
||||
struct window_pane *wp;
|
||||
const char *env[] = CHILD_ENVIRON;
|
||||
char buf[256];
|
||||
char *cmd, *cwd;
|
||||
char buf[256], *cmd, *cwd, *cause;
|
||||
u_int i, hlimit, lines;
|
||||
|
||||
if ((wl = cmd_find_window(ctx, data->target, &s)) == NULL)
|
||||
@ -168,8 +167,10 @@ cmd_split_window_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
lines = (w->active->sy * data->percentage) / 100;
|
||||
|
||||
hlimit = options_get_number(&s->options, "history-limit");
|
||||
if ((wp = window_add_pane(w, lines, cmd, cwd, env, hlimit)) == NULL) {
|
||||
ctx->error(ctx, "command failed: %s", cmd);
|
||||
wp = window_add_pane(w, lines, cmd, cwd, env, hlimit, &cause);
|
||||
if (wp == NULL) {
|
||||
ctx->error(ctx, "create pane failed: %s", cause);
|
||||
xfree(cause);
|
||||
return (-1);
|
||||
}
|
||||
server_redraw_window(w);
|
||||
|
Reference in New Issue
Block a user