File tree 1 file changed +0
-53
lines changed
1 file changed +0
-53
lines changed Original file line number Diff line number Diff line change @@ -549,59 +549,6 @@ if (
549
549
}
550
550
}
551
551
552
- /**
553
- *
554
- * @param potential_pid {number}
555
- */
556
- function existPid ( potential_pid ) {
557
- try {
558
- return process . kill ( potential_pid , 0 ) ;
559
- } catch ( err ) {
560
- return false ;
561
- }
562
- }
563
-
564
- // Initialization and get locker file
565
- while ( true ) {
566
- if ( acquireLockFile ( ) ) {
567
- break ;
568
- } else {
569
- var potential_pid ;
570
- try {
571
- var content = fs . readFileSync ( lockFileName , "ascii" ) ;
572
- potential_pid = parseInt ( content ) ;
573
- } catch ( err ) {
574
- // ignore
575
- }
576
- var validPid = potential_pid !== undefined && ! isNaN ( potential_pid ) ;
577
-
578
- if ( validPid && ! existPid ( potential_pid ) ) {
579
- console . log ( "Stale file detected : " , lockFileName ) ;
580
- try {
581
- fs . unlinkSync ( lockFileName ) ;
582
- } catch ( err ) { }
583
- console . log ( "Retry:" ) ;
584
- continue ;
585
- } else {
586
- error_output ( "Error: could not acquire lockfile" , "Error" ) ;
587
- console . error ( " " + lockFileName ) ;
588
-
589
- console . log (
590
- "Could be another process running in the background" ,
591
- "\nEither kill that process or delete the staled lock"
592
- ) ;
593
- if ( validPid ) {
594
- console . error (
595
- "Try run command: " ,
596
- "`kill " ,
597
- potential_pid ,
598
- " || rm -f .bsb.lock`"
599
- ) ;
600
- }
601
- process . exit ( 2 ) ;
602
- }
603
- }
604
- }
605
552
watchers . push ( { watcher : fs . watch ( bsconfig , on_change ) , dir : bsconfig } ) ;
606
553
build ( 0 ) ;
607
554
}
You can’t perform that action at this time.
0 commit comments