mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Make sure the direcory where the test socket is to be created exists
This commit is contained in:
@ -17,6 +17,8 @@
|
|||||||
package My::Platform;
|
package My::Platform;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
use File::Basename;
|
||||||
|
use My::File::Path; # Patched version of File::Path
|
||||||
|
|
||||||
use base qw(Exporter);
|
use base qw(Exporter);
|
||||||
our @EXPORT= qw(IS_CYGWIN IS_WINDOWS IS_WIN32PERL
|
our @EXPORT= qw(IS_CYGWIN IS_WINDOWS IS_WIN32PERL
|
||||||
@ -104,11 +106,16 @@ sub check_socket_path_length {
|
|||||||
|
|
||||||
my $sock;
|
my $sock;
|
||||||
eval {
|
eval {
|
||||||
|
# Create the directories where the
|
||||||
|
# socket till be created
|
||||||
|
mkpath(dirname($path));
|
||||||
|
|
||||||
$sock= new IO::Socket::UNIX
|
$sock= new IO::Socket::UNIX
|
||||||
(
|
(
|
||||||
Local => $path,
|
Local => $path,
|
||||||
Listen => 1,
|
Listen => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
if ($@)
|
if ($@)
|
||||||
{
|
{
|
||||||
@ -116,7 +123,7 @@ sub check_socket_path_length {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if (!defined $sock){
|
if (!defined $sock){
|
||||||
# Could not create a UNIX domain socket
|
#print "Could not create UNIX domain socket: $!\n";
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
if ($path ne $sock->hostpath()){
|
if ($path ne $sock->hostpath()){
|
||||||
|
Reference in New Issue
Block a user