#1 Unix/Linux: socket per user

closed-accepted
nobody
None
5
2009-06-06
2009-05-25
Anonymous
No

There is a problem if two (or more) users on the same machine (for example root and user) run juffed with "open with existing instance" option set. This option works only for the first one who sets it on.
Attached patch makes the socket per user. Tested on Juffed 0.6.1 on Pardus Linux.

The username or socket path should be probably stored in private static member variable in AppInfo initialized in (new file) AppInfo.cpp. But AppInfo.h is included in both juffed binary and libjuff.so and I think the username should be only in binary in this case.

Best Regards
David Stegbauer, daaste - gmail - com

Discussion

  • socket_per_user.patch

     
    Attachments
  • Mezomish
    Mezomish
    2009-06-04

    Thanks.
    Testing now - observing some strange behavior even when using with one user.
    Actually, single instance doesn't work even if I use other socket name than "/tmp/juffed".
    Investigating now...

     
  • Mezomish
    Mezomish
    2009-06-04

    • status: open --> open-accepted
     
  • Mezomish
    Mezomish
    2009-06-04

    • status: open-accepted --> pending-accepted
     
  • Mezomish
    Mezomish
    2009-06-06

    Solved and accepted (commits 553 and 554).

     
  • Mezomish
    Mezomish
    2009-06-06

    • status: pending-accepted --> closed-accepted