Repository navigation
Commit 226ca06
authored
On FreeBSD, use /dev/fd/ in fd_count() if it's mounted (#160210)
fd_count() can now use /dev/fd/ fdescfs file system if it's mounted,
which is not the case by default. Otherwise, call os.dup(fd) in a
loop which is slow since os.sysconf("SC_OPEN_MAX") is larger than
200,000 by default.1 parent 3b3c692 commit 226ca06
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
691 | 709 | | |
692 | 710 | | |
693 | 711 | | |
| |||
735 | 753 | | |
736 | 754 | | |
737 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
738 | 759 | | |
739 | 760 | | |
740 | 761 | | |
| |||
0 commit comments