long for pid.

pull/1/head
Nicholas Marriott 2008-07-01 20:35:16 +00:00
parent dd41035a4d
commit e5cf8594e8
5 changed files with 11 additions and 11 deletions

View File

@ -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> * 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; ssize_t n;
log_debug("buffer_poll (%d): fd=%d, revents=%d; out=%zu in=%zu", log_debug("buffer_poll (%ld): fd=%d, revents=%d; out=%zu in=%zu",
(int) getpid(), (long) getpid(),
pfd->fd, pfd->revents, BUFFER_USED(out), BUFFER_USED(in)); pfd->fd, pfd->revents, BUFFER_USED(out), BUFFER_USED(in));
if (pfd->revents & (POLLERR|POLLNVAL|POLLHUP)) if (pfd->revents & (POLLERR|POLLNVAL|POLLHUP))

View File

@ -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> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -45,7 +45,7 @@ client_fill_session(struct msg_command_data *data)
return; return;
data->idx = ll; data->idx = ll;
ll = strtonum(buf, 0, LLONG_MAX, &errstr); ll = strtonum(buf, 0, LONG_MAX, &errstr);
if (errstr != NULL) if (errstr != NULL)
return; return;
data->pid = ll; data->pid = ll;

4
cmd.c
View File

@ -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> * 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 != NULL && data->pid != -1) {
if (data->pid != getpid()) { if (data->pid != getpid()) {
ctx->error(ctx, "wrong server: %lld", data->pid); ctx->error(ctx, "wrong server: %ld", (long) data->pid);
return (NULL); return (NULL);
} }
if (data->idx > ARRAY_LENGTH(&sessions)) { if (data->idx > ARRAY_LENGTH(&sessions)) {

4
tmux.h
View File

@ -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> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -355,7 +355,7 @@ struct hdr {
}; };
struct msg_command_data { 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 */ u_int idx; /* index from $TMUX */
size_t namelen; size_t namelen;

View File

@ -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> * 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"); fatal("putenv failed");
} }
sigreset(); 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(); log_close();
execl(_PATH_BSHELL, "sh", "-c", w->cmd, (char *) NULL); execl(_PATH_BSHELL, "sh", "-c", w->cmd, (char *) NULL);