src/hotspot/os/bsd/attachListener_bsd.cpp
changeset 50067 88b76c19d8eb
parent 49742 1196aa0be8be
child 50333 7cea35f78b50
equal deleted inserted replaced
50066:bd3e4517dfa3 50067:88b76c19d8eb
   213   res = ::listen(listener, 5);
   213   res = ::listen(listener, 5);
   214   if (res == 0) {
   214   if (res == 0) {
   215     RESTARTABLE(::chmod(initial_path, S_IREAD|S_IWRITE), res);
   215     RESTARTABLE(::chmod(initial_path, S_IREAD|S_IWRITE), res);
   216     if (res == 0) {
   216     if (res == 0) {
   217       // make sure the file is owned by the effective user and effective group
   217       // make sure the file is owned by the effective user and effective group
   218       // (this is the default on linux, but not on mac os)
   218       // e.g. default behavior on mac is that new files inherit the group of
       
   219       // the directory that they are created in
   219       RESTARTABLE(::chown(initial_path, geteuid(), getegid()), res);
   220       RESTARTABLE(::chown(initial_path, geteuid(), getegid()), res);
   220       if (res == 0) {
   221       if (res == 0) {
   221         res = ::rename(initial_path, path);
   222         res = ::rename(initial_path, path);
   222       }
   223       }
   223     }
   224     }