K
K
Kamikaze10242019-05-14 11:30:49
Perl
Kamikaze1024, 2019-05-14 11:30:49

Why is the socket not created using perl?

Good afternoon! We have a perl script that creates a socket at an address in the file system, the script is part of our window manager.
The problem is this:
When I start the service manually with the startx <service name> command, the socket in the script is created correctly, and if I try to start the service with systemd, the socket is not created with the message: Handle not opened for input at /usr/lib/x86_64 -linux-gnu/perl5/5.24/Tk/Event/IO.pm line 122. What is the reason? The path to the socket is available.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GTRxShock, 2017-05-02
@MikhailBond

at least "$patternNic='/nic.*/'"
or:

preg_match('/nic([\d-]*)/', 'nic0000-0000-0000', $matches); 
var_dump($matches[1]); // string(14) "0000-0000-0000"

ps and it's better to call it not a pattern, but a regular expression, so people will understand what you need faster

S
Sledge5, 2017-05-02
@Sledge5

$mac = substr("nic0000-0000-0000", 3);
I don't understand why RegExp is here?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question