[ace-users] ACE_File_Lock open failed
Steve Huston
shuston at riverace.com
Wed Jun 13 16:46:52 CDT 2007
Hi Cui,
Thank you for using the PROBLEM-REPORT-FORM. I'm not sure why this
error is happening. You could try the following:
1. Run your debugger and trace down to where the error happens.
2. Take advantage of our support services to assist you in diagnosing
this and getting a fix to ACE and/or your code if needed. You can read
about our support services here: http://www.riverace.com/support.htm.
3. Try the latest beta to see if the behavior is any different.
Best regards,
-Steve
--
Steve Huston, Riverace Corporation
Would you like ACE to run great on your platform?
See http://www.riverace.com/sponsor.htm
> -----Original Message-----
> From: ace-users-bounces at cse.wustl.edu=20
> [mailto:ace-users-bounces at cse.wustl.edu] On Behalf Of cui shaowei
> Sent: Friday, June 08, 2007 10:42 PM
> To: ace-users at cse.wustl.edu
> Subject: [ace-users] ACE_File_Lock open failed
>=20
>=20
> PRF:
> TARGET MACHINE :Celeron(R) CPU 2.0GHz ,
> OPERATING SYSTEM: Win XP Professional sp2
>=20
> ACE VERSION: 5.5
> config.h use config-win32.h (use default)
> COMPILER NAME : VC6.0
>=20
> question:
> I want to use ACE_File_Lock to enusre my exe run single instance;
> #include <ace/OS_NS_unistd.h>
> #include <ace/OS_NS_stdio.h>
> #include <ace/File_Lock.h>
> int main (int argc, ACE_TCHAR *argv[])
> {
> ACE_File_Lock fk;
> if (fk.open ("tmp", 0))
> ACE_OS::printf ("open failed\n");
> if (fk.tryacquire_write () =3D=3D -1)
> {
> ACE_OS::printf ("You have a running server instance,
> please kill it first!\n");
> //ACE_OS::fflush (stdout);=09
> return -1;
> }
> //ACE_OS::sleep (20);
> return 0;
> }
> // also , why ACE_OS::fflush and ACE_OS::sleep link failed=20
> (compile succ)
> --=20
> =B4=DE=C9=D9=CE=B0
> Tel: 13810421852
> QQ: 43458943
> MSN: shaovie at hotmail.com
>=20
More information about the Ace-users
mailing list