}
if (pname && isPipeOwner) {
- unlink(pname);
- if (mkfifo(pname, 0666)) {
- log_system_error_and_exit("mkfifo(%s)", pname);
+ // TODO: should be refactored: move to separate function
+ int result = 0;
+
+ result = unlink(pname);
+ if (result == 0) {
+ if (verbose) {
+ log_message("unlink(%s)", pname);
+ }
+ } else if (errno != ENOENT) {
+ log_system_error_and_exit("unlink(%s)", pname);
}
-#if TIZEN
- /* This may be useful for "root on" start */
- if (setxattr(pname, "security.SMACK64", "User::App::Shared",
- strlen("User::App::Shared"),0)) {
- log_system_error("setattr");
+
+ result = mkfifo(pname, 0666);
+ if (result == 0) {
+ if (verbose) {
+ log_message("mkfifo(%s)", pname);
+ }
+ } else {
+ log_system_error_and_exit("mkfifo(%s)", pname);
}
-#endif /* TIZEN */
}
#if TIZEN