projects
/
platform
/
core
/
appfw
/
launchpad.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc7260d
)
Revert "Fix id file creation"
07/266407/1
author
Hwankyu Jhun
<h.jhun@samsung.com>
Thu, 11 Nov 2021 14:54:47 +0000
(23:54 +0900)
committer
Hwankyu Jhun
<h.jhun@samsung.com>
Thu, 11 Nov 2021 14:54:52 +0000
(23:54 +0900)
This reverts commit
a8f63eec9bca4a3a58699294b4c6216d5240c1d0
.
Change-Id: I27d0dc189801f6665d08ac49b70c532d90d822c6
src/lib/common/src/launchpad_common.c
patch
|
blob
|
history
diff --git
a/src/lib/common/src/launchpad_common.c
b/src/lib/common/src/launchpad_common.c
index 7bfd5474b833346ed4d79c18b40fbcdc58f89189..17ab641c0bd2d4edf0025561193b599f351fa1b5 100644
(file)
--- a/
src/lib/common/src/launchpad_common.c
+++ b/
src/lib/common/src/launchpad_common.c
@@
-1415,18
+1415,17
@@
int _verify_proc_caps(void)
int _prepare_id_file(void)
{
char path[PATH_MAX];
-
FILE* fp
;
+
int fd
;
snprintf(path, sizeof(path), "/run/aul/apps/%u/%d/%s",
getuid(), getpid(), getenv("AUL_APPID"));
- f
p = fopen(path, "w"
);
- if (
!fp
) {
- _E("
fopen() is failed. path(%s),
errno(%d)", path, errno);
+ f
d = open(path, O_CREAT | O_WRONLY | O_TRUNC, 0600
);
+ if (
fd < 0
) {
+ _E("
Failed to create %s.
errno(%d)", path, errno);
return -1;
}
+ close(fd);
- fprintf(fp, "0");
- fclose(fp);
return 0;
}