Skip to content

Commit

Permalink
pid initially in shm
Browse files Browse the repository at this point in the history
  • Loading branch information
Goheeca committed May 17, 2019
1 parent 9708c85 commit 000b006
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/screen_render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include "screen.h"
#include "fbconfig.h"

Expand Down Expand Up @@ -97,6 +98,7 @@ void Screen::initFillDraw()
if (falloc = fallocate(mBackgroundFd, FALLOC_FL_ZERO_RANGE, 0, mSize)) {
mBackgroundData = mmap(NULL, mSize, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_POPULATE, mBackgroundFd, 0);
redrawBg();
snprintf((char *)mBackgroundData, mSize, "%u", getpid());
}
}
}
Expand Down

0 comments on commit 000b006

Please sign in to comment.