Il giorno giovedì 6 ottobre 2016 18:40:42 UTC+2, Ian Lance Taylor ha
scritto:
>
> On Thu, Oct 6, 2016 at 8:28 AM, Manlio Perillo > wrote:
> > Il giorno giovedì 6 ottobre 2016 03:13:32 UTC+2, Dave Cheney ha scritto:
> >>
> >> Stick an @ at the start of the file name, or the socket will remain o
On Thu, Oct 6, 2016 at 8:28 AM, Manlio Perillo wrote:
> Il giorno giovedì 6 ottobre 2016 03:13:32 UTC+2, Dave Cheney ha scritto:
>>
>> Stick an @ at the start of the file name, or the socket will remain on
>> disk after the process has exited.
>
>
> According to http://man7.org/linux/man-pages/man
Il giorno giovedì 6 ottobre 2016 03:13:32 UTC+2, Dave Cheney ha scritto:
>
> Stick an @ at the start of the file name, or the socket will remain on
> disk after the process has exited.
According to http://man7.org/linux/man-pages/man7/unix.7.html, on Linux an
abstract socket address is specifie
Splendid! Thanks Justin! Thanks Dave! I was doing it wrong l, err :=
net.Listen("unix", "/tmp/lablock") which as Justin said should be l, err :=
net.ListenUnix("unix", &net.UnixAddr{Name: "@/tmp/lablock", Net: "unix"}).
BTW @ was very handy! But it should be at start of the whole file path, not
It's a Linux thing, Google abstract domain socket.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, vi
On Thu, Oct 6, 2016 at 2:13 PM Dave Cheney wrote:
> Stick an @ at the start of the file name, or the socket will remain on
> disk after the process has exited
>
That's even better, and doesn't need to use the Remove().
I didn't see it documented about using @ for abstract socket. Did I miss
that
Stick an @ at the start of the file name, or the socket will remain on disk
after the process has exited.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang
On Thu, Oct 6, 2016 at 3:15 AM dc0d wrote:
> Nice! Seems working!
>
> I could not get Unix Domain Socket to work, since I expected an error on
> Listen or Accept but there were no errors.
>
Works fine when I tested it using this approach:
https://play.golang.org/p/A1C5BEIP2G
func main() {
Nice! Seems working!
I could not get Unix Domain Socket to work, since I expected an error on
Listen or Accept but there were no errors.
On Wednesday, October 5, 2016 at 12:00:12 AM UTC+3:30, Ingo Oeser wrote:
>
> Are you looking for something like
> https://godoc.org/github.com/nightlyone/lock
A unix domain socket seems reliable since the OS will clean it up for you
regardless of how your application terminates.
Justin
On Wed, Oct 5, 2016 at 9:30 AM 'Ingo Oeser' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> Are you looking for something like
> https://godoc.org/github.com/
Are you looking for something like
https://godoc.org/github.com/nightlyone/lockfile ?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@goo
Not directly, but a system wide mutex can be built on top of sysv
semaphores, files on disk, or an open tcp or unix domain socket.
As this lock would be system wide, the main consideration is to ensure that
it is _always_ unlocked when the owning process dies for any reason. Then
that just leav
I had the same question tonight! On Windows (using C#) I just create a
Named Mutex, which is system wide. One of values that it returns identifies
that if the mutex is already created by other instance, or it's the first
time it's being created on this system.
Is there something similar on Linu
13 matches
Mail list logo