X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=opjitconv%2Fopjitconv.c;h=e28bd29d28164c113d6a21339974924f103f4beb;hb=a5084ed2c700851be395040fedd6026cbf5a1f8b;hp=fb38fb3add29c51c73572209e381c044aace3120;hpb=03794400ec59d85ab7378e756518229c3d4348ef;p=platform%2Fupstream%2Foprofile.git diff --git a/opjitconv/opjitconv.c b/opjitconv/opjitconv.c index fb38fb3..e28bd29 100644 --- a/opjitconv/opjitconv.c +++ b/opjitconv/opjitconv.c @@ -216,7 +216,7 @@ int copy_dumpfile(char const * dumpfile, char * tmp_dumpfile) int file_locked = 0; unsigned int usecs_waited = 0; int rc = OP_JIT_CONV_OK; - int fd = open(dumpfile, S_IRUSR); + int fd = open(dumpfile, O_RDONLY); if (fd < 0) { perror("opjitconv failed to open JIT dumpfile"); return OP_JIT_CONV_FAIL; @@ -819,6 +819,7 @@ static int _process_args(int argc, char * const argv[]) { int keep_trying = 1; int idx_of_non_options = 0; + char * prev_env = getenv("POSIXLY_CORRECT"); setenv("POSIXLY_CORRECT", "1", 0); while (keep_trying) { int option_idx = 0; @@ -853,6 +854,10 @@ static int _process_args(int argc, char * const argv[]) break; } } + + if (prev_env == NULL) + unsetenv("POSIXLY_CORRECT"); + return idx_of_non_options; }