File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,11 @@ function getAllProcesses(callback) {
98
98
var fullPath = path . join ( sockPath , name ) ,
99
99
socket = new nssocket . NsSocket ( ) ;
100
100
101
+ if ( process . platform === 'win32' ) {
102
+ // it needs the prefix
103
+ fullPath = '\\\\.\\pipe\\' + fullPath ;
104
+ }
105
+
101
106
socket . connect ( fullPath , function ( err ) {
102
107
if ( err ) {
103
108
next ( err ) ;
Original file line number Diff line number Diff line change @@ -71,6 +71,16 @@ Worker.prototype.start = function (callback) {
71
71
self . exitOnStop && process . exit ( ) ;
72
72
} ) ;
73
73
74
+ if ( process . platform === 'win32' ) {
75
+ //
76
+ // On Windows, delete the 'symbolic' sock file. This
77
+ // file is used for exploration during `forever list`
78
+ // as a mapping to the `\\.pipe\\*` "files" that can't
79
+ // be enumerated because ... Windows.
80
+ //
81
+ fs . unlink ( self . _sockFile ) ;
82
+ }
83
+
74
84
self . monitor . stop ( ) ;
75
85
} ) ;
76
86
@@ -110,6 +120,21 @@ Worker.prototype.start = function (callback) {
110
120
'sock'
111
121
] . join ( '.' ) ) ;
112
122
123
+ if ( process . platform === 'win32' ) {
124
+ //
125
+ // Create 'symbolic' file on the system, so it can be later
126
+ // found via "forever list" since the `\\.pipe\\*` "files" can't
127
+ // be enumerated because ... Windows.
128
+ //
129
+ fs . openSync ( sock , 'w' ) ;
130
+
131
+ //
132
+ // It needs the prefix, otherwise EACCESS error happens on Windows
133
+ // (no .sock extension, only named pipes with .pipe prefixes)
134
+ //
135
+ sock = '\\\\.\\pipe\\' + sock ;
136
+ }
137
+
113
138
self . _socket . listen ( sock ) ;
114
139
}
115
140
You can’t perform that action at this time.
0 commit comments