Mono.Posix to Mono.Unix and Mono.Unix.Native

This commit is contained in:
Jim Norman 2006-01-09 23:44:00 +00:00
parent c15c0149e2
commit 81420d16b5
3 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,7 @@
using System;
using System.Net;
using System.Net.Sockets;
using Mono.Unix;
using Mono.Unix.Native;
using System.IO;
using System.Text;
using System.Threading;
@ -20,7 +20,7 @@ namespace sscs.communication
private Socket listeningSocket;
private Socket connectedSocket;
private string socketFileName = "/tmp/.novellCASA";
private EndPoint sockEndPoint;
private Mono.Unix.UnixEndPoint sockEndPoint;
private ManualResetEvent eventVar = null;
@ -34,7 +34,7 @@ namespace sscs.communication
listeningSocket = new Socket( AddressFamily.Unix,
SocketType.Stream,
ProtocolType.IP );
sockEndPoint = new UnixEndPoint(socketFileName);
sockEndPoint = new Mono.Unix.UnixEndPoint(socketFileName);
eventVar = new ManualResetEvent(true);
}

View File

@ -1,7 +1,7 @@
using System;
using System.Net;
using System.Net.Sockets;
using Mono.Posix;
using Mono.Unix;
using System.IO;
using System.Text;
using sscs.common;

View File

@ -23,7 +23,7 @@ class SecretStoreClientService
if(!AcquireLock())
{
Console.WriteLine("Another instance of micasad is already running");
Mono.Unix.Syscall.exit(-1);
Mono.Unix.Native.Syscall.exit(-1);
}
RegisterSignals();
@ -102,11 +102,11 @@ class SecretStoreClientService
if(( (int)Environment.OSVersion.Platform) == 128)
{
//SIGTERM
Mono.Unix.Stdlib.signal(Mono.Unix.Signum.SIGTERM, new Mono.Unix.SignalHandler(Terminate));
Mono.Unix.Native.Stdlib.signal(Mono.Unix.Native.Signum.SIGTERM, new Mono.Unix.Native.SignalHandler(Terminate));
//SIGINT
Mono.Unix.Stdlib.signal(Mono.Unix.Signum.SIGINT, new Mono.Unix.SignalHandler(Terminate));
Mono.Unix.Native.Stdlib.signal(Mono.Unix.Native.Signum.SIGINT, new Mono.Unix.Native.SignalHandler(Terminate));
//SIGHUP
Mono.Unix.Stdlib.signal(Mono.Unix.Signum.SIGHUP, new Mono.Unix.SignalHandler(Terminate));
Mono.Unix.Native.Stdlib.signal(Mono.Unix.Native.Signum.SIGHUP, new Mono.Unix.Native.SignalHandler(Terminate));
}
}
@ -131,12 +131,12 @@ class SecretStoreClientService
{
File.Delete(ConstStrings.SSCS_LINUX_PIDFILE);
}
Mono.Unix.Syscall.exit(0);
Mono.Unix.Native.Syscall.exit(0);
}
}
private static void CreatePidFile()
{
int pid = Mono.Unix.Syscall.getpid();
int pid = Mono.Unix.Native.Syscall.getpid();
string pidStr = String.Format("{0}",pid);
FileInfo fInfo = new FileInfo(ConstStrings.SSCS_LINUX_PIDFILE);