mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-23 16:43:11 +01:00
long for pid.
This commit is contained in:
parent
dd41035a4d
commit
e5cf8594e8
@ -1,4 +1,4 @@
|
||||
/* $Id: buffer-poll.c,v 1.7 2008-06-18 22:21:51 nicm Exp $ */
|
||||
/* $Id: buffer-poll.c,v 1.8 2008-07-01 20:35:16 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -41,8 +41,8 @@ buffer_poll(struct pollfd *pfd, struct buffer *in, struct buffer *out)
|
||||
{
|
||||
ssize_t n;
|
||||
|
||||
log_debug("buffer_poll (%d): fd=%d, revents=%d; out=%zu in=%zu",
|
||||
(int) getpid(),
|
||||
log_debug("buffer_poll (%ld): fd=%d, revents=%d; out=%zu in=%zu",
|
||||
(long) getpid(),
|
||||
pfd->fd, pfd->revents, BUFFER_USED(out), BUFFER_USED(in));
|
||||
|
||||
if (pfd->revents & (POLLERR|POLLNVAL|POLLHUP))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: client-fn.c,v 1.3 2007-10-23 10:48:22 nicm Exp $ */
|
||||
/* $Id: client-fn.c,v 1.4 2008-07-01 20:35:16 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -45,7 +45,7 @@ client_fill_session(struct msg_command_data *data)
|
||||
return;
|
||||
data->idx = ll;
|
||||
|
||||
ll = strtonum(buf, 0, LLONG_MAX, &errstr);
|
||||
ll = strtonum(buf, 0, LONG_MAX, &errstr);
|
||||
if (errstr != NULL)
|
||||
return;
|
||||
data->pid = ll;
|
||||
|
4
cmd.c
4
cmd.c
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd.c,v 1.60 2008-06-29 07:04:30 nicm Exp $ */
|
||||
/* $Id: cmd.c,v 1.61 2008-07-01 20:35:16 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -309,7 +309,7 @@ cmd_current_session(struct cmd_ctx *ctx)
|
||||
|
||||
if (data != NULL && data->pid != -1) {
|
||||
if (data->pid != getpid()) {
|
||||
ctx->error(ctx, "wrong server: %lld", data->pid);
|
||||
ctx->error(ctx, "wrong server: %ld", (long) data->pid);
|
||||
return (NULL);
|
||||
}
|
||||
if (data->idx > ARRAY_LENGTH(&sessions)) {
|
||||
|
4
tmux.h
4
tmux.h
@ -1,4 +1,4 @@
|
||||
/* $Id: tmux.h,v 1.173 2008-07-01 19:47:02 nicm Exp $ */
|
||||
/* $Id: tmux.h,v 1.174 2008-07-01 20:35:16 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -355,7 +355,7 @@ struct hdr {
|
||||
};
|
||||
|
||||
struct msg_command_data {
|
||||
long long pid; /* pid from $TMUX or -1 */
|
||||
pid_t pid; /* pid from $TMUX or -1 */
|
||||
u_int idx; /* index from $TMUX */
|
||||
|
||||
size_t namelen;
|
||||
|
4
window.c
4
window.c
@ -1,4 +1,4 @@
|
||||
/* $Id: window.c,v 1.47 2008-06-30 18:27:14 nicm Exp $ */
|
||||
/* $Id: window.c,v 1.48 2008-07-01 20:35:16 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -248,7 +248,7 @@ window_spawn(struct window *w, const char *cmd, const char **envp)
|
||||
fatal("putenv failed");
|
||||
}
|
||||
sigreset();
|
||||
log_debug("new child: cmd=%s; pid=%d", w->cmd, (int) getpid());
|
||||
log_debug("new child: cmd=%s; pid=%ld", w->cmd, (long) getpid());
|
||||
log_close();
|
||||
|
||||
execl(_PATH_BSHELL, "sh", "-c", w->cmd, (char *) NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user