Hi Cindy,
If the SEM REQUEST MUTEX request worked, you get RC 0 and no message in
the result. You can then query the mutex if you like to see that it is
now exists and is owned. For example:
C:\>STAF local SEM REQUEST MUTEX MutexStart GARBAGECOLLECT NO
Response
--------
C:\>STAF local SEM QUERY MUTEX MutexStart
Response
--------
{
State : Owned
Owner : {
Machine : client1.austin.ibm.com
Handle Name : STAF/Client
Handle : 147
User : none://anonymous
Endpoint : local://local
Date-Time Requested : 20120228-16:46:08
Date-Time Acquired : 20120228-16:46:08
Perform Garbage Collection: No
}
Pending Requests: []
}
When you're ready to release the mutex semaphore, you can do so as
follows. Note that if successful, RC=0 and there will be no message in
the result.
C:\>STAF local SEM RELEASE MUTEX MutexStart FORCE
Response
--------
C:\>STAF local SEM QUERY MUTEX MutexStart
Response
--------
{
State : Unowned
Owner : <None>
Pending Requests: []
}
C:\>
Note that the section "8.15.2 REQUEST" in the STAF User's Guide at
http://staf.sourceforge.net/current/STAFUG.htm#HDRSEMSRV says in its
"Results" sub-section says:
Results
The result buffer will contain no data on a successful return from a
REQUEST command.
Note that many STAF service requests do not return any data in the result
when successful when there is nothing more to say. The RC=0 indicates
that the STAF service request was successful.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: Cindy Zhu <c...@fekete.com>
To: "staf-users@lists.sourceforge.net"
<staf-users@lists.sourceforge.net>,
Date: 02/28/2012 03:40 PM
Subject: [staf-users] Request Mutex
Hi,
I sent a STAF command “STAF local SEM REQUEST MUTEX MutexStart
GARBAGECOLLECT NO” to request a mutex from the command line. But I didn’t
see any response.
Can you please tell me how to debug this?
I tried other STAF commands on the same machine and I got responses.
Thanks,
Cindy
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users