rio: format pid's as ulongs
This commit is contained in:
parent
ed3ae3faa3
commit
544bca0290
1 changed files with 3 additions and 3 deletions
|
@ -1420,7 +1420,7 @@ wclosewin(Window *w)
|
||||||
void
|
void
|
||||||
wsetpid(Window *w, int pid, int dolabel)
|
wsetpid(Window *w, int pid, int dolabel)
|
||||||
{
|
{
|
||||||
char buf[64];
|
char buf[32];
|
||||||
int ofd;
|
int ofd;
|
||||||
|
|
||||||
ofd = w->notefd;
|
ofd = w->notefd;
|
||||||
|
@ -1428,11 +1428,11 @@ wsetpid(Window *w, int pid, int dolabel)
|
||||||
w->notefd = -1;
|
w->notefd = -1;
|
||||||
else {
|
else {
|
||||||
if(dolabel){
|
if(dolabel){
|
||||||
snprint(buf, sizeof(buf), "rc %d", pid);
|
snprint(buf, sizeof(buf), "rc %lud", (ulong)pid);
|
||||||
free(w->label);
|
free(w->label);
|
||||||
w->label = estrdup(buf);
|
w->label = estrdup(buf);
|
||||||
}
|
}
|
||||||
snprint(buf, sizeof(buf), "/proc/%d/notepg", pid);
|
snprint(buf, sizeof(buf), "/proc/%lud/notepg", (ulong)pid);
|
||||||
w->notefd = open(buf, OWRITE|OCEXEC);
|
w->notefd = open(buf, OWRITE|OCEXEC);
|
||||||
}
|
}
|
||||||
if(ofd >= 0)
|
if(ofd >= 0)
|
||||||
|
|
Loading…
Reference in a new issue