/
ChangeLog
2095 lines (1398 loc) · 63.7 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2005-05-06 Dick Porter <dick@ximian.com>
* handles-private.h:
* mutexes.c:
* wapi-private.h:
* shared.h:
* shared.c:
* wait.c:
* handles.c:
* collection.h: Use SysV semaphores for managing access to the
shared memory - in return for the ludicrous api we get
synchronisation primitives that can be cleaned up by the kernel
even when a process quits unexpectedly. This removes the
timestamp issues.
2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
* handles.c: Always use polling in the waits, since
mono_cond_timedwait can't be interruped by the thread abort signal.
2005-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* events.c: calling Set on AutoResetEvent several times has the same
effect as calling it only once if no thread is waiting for it.
2005-04-29 Dick Porter <dick@ximian.com>
* processes.c (EnumProcesses): Use a GArray instead of a GPtrArray
now it's storing pids not handles, also fixes memory leak caused
by unclear glib documentation.
* sockets.c (WSACleanup): Remove unused variable
2005-04-29 Dick Porter <dick@ximian.com>
* handles.c (_wapi_handle_check_share_by_pid): For systems that
don't have file descriptor info in /proc check that the original
opener of a file is still there, if a share violation would
otherwise happen.
2005-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* handles.c:
* handles-private.h: added _wapi_handle_forecch that loops through all
the handles and call a callback function when a handle of the given
type is found.
* sockets.c: no need to keep open sockets in an array, as we have them
in the handles structure.
Fixes bug #74755.
2005-04-28 Dick Porter <dick@ximian.com>
* processes.c: Cope with handles that are only around for as long
as the search is running. If we're searching for process handles,
check to see if the process is still running and signal it if not.
* handles.c (_wapi_search_handle): Search in the shared space as
well. Fixed bug 74752.
* mutexes.c:
* handles.c (_wapi_handle_new_from_offset):
_wapi_handle_new_for_existing_ns () was doing exactly the same as
this, so deleted it.
2005-04-26 Dick Porter <dick@ximian.com>
* handles.c: Fix stupid thinko where if a new shared handle is
created but a collection was needed to free some space, it
returned an error anyway. Should fix the messages shown in bug
74659.
2005-04-25 Dick Porter <dick@ximian.com>
* handles.c (_wapi_handle_check_share): Only consider mono
processes when looking to see if a file is still being held open,
while checking share permissions.
2005-04-25 Dick Porter <dick@ximian.com>
* sockets.c:
* io.c:
* wapi-private.h (struct _WapiHandleOps):
* handles.c (_wapi_handle_unref): When destroying handles, save
the handle data and call the close function only after the array
slot has been cleared. This prevents race conditions with file
descriptors, fixing bug 74713.
* mutexes.c: Delete the handle close functions, they didn't do
anything anyway
* error.c (_wapi_get_win32_file_error): Add a mapping for EINTR so
the "Unknown error" g_warning doesn't get displayed.
2005-04-25 Dick Porter <dick@ximian.com>
* wapi-private.h:
* threads.c: Make thread handles process-private for now to take
some of the space pressure off the shared memory, while I work on
a real fix.
2005-04-21 Dick Porter <dick@ximian.com>
* handles.c (_wapi_handle_check_share): Make sure there is a "fd"
dir in /proc before blowing away handle info. Fixes bug 74649.
2005-04-21 Dick Porter <dick@ximian.com>
* wait.c (WaitForMultipleObjectsEx): Implement special waits
* handles.c (_wapi_handle_wait_signal_poll_share): Don't return a
timeout, just wait briefly for the private signals and let the
waiting thread test again. This prevents us missing shared
signals.
2005-04-21 Dick Porter <dick@ximian.com>
* collection.h (_WAPI_HANDLE_COLLECTION_EXPIRED_INTERVAL): Reduce
the time before a slot is considered too old and deleted. This is
a workaround while I come up with a proper fix.
2005-04-21 Dick Porter <dick@ximian.com>
* mutexes.c:
* processes.c:
* threads.c:
* handles.c (_wapi_handle_new): Turn assertions into errors.
* collection.c (_wapi_handle_collect): Use symbols not magic
numbers for timeout values
2005-04-19 Dick Porter <dick@ximian.com>
* mutexes.c:
* wait.c:
* handles.c (_wapi_handle_count_signalled_handles)
* handles-private.h (_wapi_handle_shared_lock_handle): Use new
shared handle locks in critical sections.
* handles.c (_wapi_handle_new_for_existing_ns): Reuse old handles
if there is already one there.
* handles.c (_wapi_handle_ref): It was possible for a process to
exit before getting around to updating shared handle timestamps,
so do it here too.
Tue Apr 19 16:25:47 CEST 2005 Paolo Molaro <lupus@ximian.com>
* threads.c: fix lookup of the thread id in the has table:
always use the id value, not the pointer to the id.
2005-04-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* handles.c: fix handle returned in _wapi_handle_search_handle. Dick
pointed it out.
2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io-layer/sockets.c: FIONBIO with a TRUE argument means we want
non-blocking IO, not the other way around.
2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* handles.c:
* io.c:
* handles-private.h: GetFileType wasn't checking if we have memory
allocated for the handle before dereferencing it. Fixes a FileStream
nunit test.
2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* handles.c:
* processes.c:
* handles-private.h: we were calling g_renew to expand the handle array,
but that might move the memory and we might have pthread conditions or
mutexes in the original memory area that are being used. Now instead of
expanding an existing array, we just create new ones and keep a list of
them. Access to _wapi_private_handles had to be modified accordingly.
2005-04-15 Dick Porter <dick@ximian.com>
* collection.c: FreeBSD needs more than PTHREAD_STACK_MIN
2005-04-14 Raja R Harinath <rharinath@novell.com>
* wapi-private.h: Remove reference to 'daemon-private.h'.
Wed Apr 13 13:12:33 EDT 2005 Paolo Molaro <lupus@ximian.com>
* atomic.h: applied patch from mass@akuma.org (David Waite)
to fix InterlockedExchangeAdd.
Fixed a few other functions, including InterlockedCompareExchange()
which was miscompiled by gcc with optimizations enabled.
2005-04-13 Dick Porter <dick@ximian.com>
* io.c (share_check):
* handles.c (_wapi_handle_check_share): Refine the file check so
that sharing violations within the same process don't cause
assertion failures.
2005-04-13 Dick Porter <dick@ximian.com>
* io.c (FindFirstFile): Fix bugs introduced with the merge (bug
74586)
2005-04-12 Dick Porter <dick@ximian.com>
The daemon-less io-layer. Extensive lowlevel changes in
handles.c, requiring some corresponding changes in other files
calling these functions. Private_foo structures have been
eliminated.
File descriptor handling differences account for most of the
changes in io.c and sockets.c.
Other highlights:
* mutexes.c: Named mutexes are now a distinct type.
* atomic.h: Fix a PPC uninitialised variable warning.
* wait.c: Check conditions before waiting on a condition variable.
* processes.c: Handle process fork and wait without a daemon
(though this has the limitation of only being able to wait for
child processes.)
2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io-private.h:
* threads.c:
* threads.h:
* io.c:
* sockets.c:
* sockets.h: removed dead code that deals with async IO.
2005-03-30 Zoltan Varga <vargaz@freemail.hu>
* atomic.c (InterlockedIncrement): Fix fallback implementation of
InterlockedIncrement and InterlockedDecrement. Fixes #74228.
2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
* io-layer.h: Add required header files for compiling with VS.NET.
2005-03-17 Miguel de Icaza <miguel@novell.com>
* io.c: don't fail on NFS when there are no more locks available.
2005-03-09 Dick Porter <dick@ximian.com>
* error.c (_wapi_get_win32_file_error): ENFILE and EMFILE should
map to ERROR_TOO_MANY_OPEN_FILES, not ERROR_NO_MORE_FILES. Fixes
bug 72671.
2005-03-09 Dick Porter <dick@ximian.com>
* daemon.c (process_process_fork): Initialise the handle data
before using it in the error case. This is probably the error
we're working around in the previous change. Spotted by Taru Jain
<tjain@novell.com> and Hemanth Yamijala <YHemanth@novell.com>.
2005-03-07 Dick Porter <dick@ximian.com>
* daemon.c: It looks like g_shell_parse_argv() can return
argv[0]=NULL somehow, yet still not give an error. Make sure we
don't pass NULL to strrchr(), working around a segfault that
showed up on ZLM testing.
2005-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* sockets.c: translate EINPROGRESS to EWOULDBLOCK in connect. This is
the expected error code showed by the test case in bug #73053.
2005-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c: another leftover.
Fri Feb 18 17:37:29 CET 2005 Paolo Molaro <lupus@ximian.com>
* io.c: fixed logic in checking errno in rev 40815.
Fri Feb 18 16:00:29 CET 2005 Paolo Molaro <lupus@ximian.com>
* threads.c: we don't depend on the GC checking tls
slots anymore.
* processes.c: remove unused ref to GC headers.
Thu Feb 17 19:57:11 CET 2005 Paolo Molaro <lupus@ximian.com>
* io.c: remove _wapi_thread_cur_apc_pending () checks
when the siscall should return immediatly and handle
the case when a syscall is interrupted without
erroring out, but returning a 0 read/write if possible.
Still the cases of read from file need to be handled.
Tue Feb 8 18:28:11 CET 2005 Paolo Molaro <lupus@ximian.com>
* threads.c: make people test with 1 MB stack per thread.
2005-01-17 Dick Porter <dick@ximian.com>
* timefuncs.h: Make WapiFileTime endian-aware, as it's often
cast to and from 64bit ints. Fixes bug 71213.
2005-01-11 Dick Porter <dick@ximian.com>
* error.c (errno_to_WSA): Add EADDRNOTAVAIL error code
translation.
Mon Jan 10 16:15:19 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
* atomic.h: Fix functions on s390.
Mon Jan 10 20:30:19 CET 2005 Paolo Molaro <lupus@ximian.com>
* atomic.h: fix some functions on ppc (tests/interlocked.cs).
2005-01-10 Dick Porter <dick@ximian.com>
* misc.c (_wapi_calc_timeout): Guard against overflow when
calculating timeouts. This makes waiting with a large
(Int32.MaxValue) timeout not return immediately.
2004-12-23 Ben Maurer <bmaurer@ximian.com>
* io.c (io_ops): make this `const' so it is shareable (well, only
really shareable if it is statically linked...)
Mon Dec 20 11:58:33 CET 2004 Paolo Molaro <lupus@ximian.com>
* threads.c, threads.h: add accessor to get the pthread_key_t for
a tls id.
2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c: check for the existence of 'dest' and set ERROR_ALREADY_EXISTS
if it exists and is not the same as 'src'.
2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
* atomic.h : Fix InterlockedCompareExchange for s390/s390x.
2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* processes.c: unquote the cmd path, allow for ' or " when quoting and
pass the quoted program name to the daemon, otherwise the call to
g_shell_unquote in the daemon will break things up.
2004-10-14 Dick Porter <dick@ximian.com>
* sockets.c (_wapi_accept): Revert the previous change. We now
set the accepted socket to have the same blocking status as the
listening socket in managed code. This follows MS behaviour.
2004-10-14 Dick Porter <dick@ximian.com>
* sockets.c (_wapi_accept): On Darwin, make sure a newly
accept()ed socket is blocking. Fixes bug 67355, patch by
grompf@sublimeintervention.com.
2004-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* system.c: check the number of online processors instead of the
existing ones. Sanitize return value if it's an error.
2004-10-03 Ben Maurer <bmaurer@ximian.com>
* system.c: Add support for getting the # of cpus.
2004-09-28 Dick Porter <dick@ximian.com>
* io.c (pipe_close_private): Fix one small typo in the last change
that totally hosed process creation with redirected pipes.
2004-09-24 Dick Porter <dick@ximian.com>
* wapi-private.h:
* sockets.c:
* socket-private.h:
* io.c:
* io-private.h:
* handles-private.h: Cope when a file descriptor is reused while
the handle that thought it owned it is still referenced, instead
of asserting. Probably fixes bug 66479, though we've been unable
to reproduce it.
2004-09-09 Dick Porter <dick@ximian.com>
* error.c:
* io.c: Set error codes everywhere.
2004-09-06 Dick Porter <dick@ximian.com>
* handles.c (_wapi_handle_unref): Reset the private record's type
(CloseHandle): Check for a fd mapping failure, and return FALSE.
(_wapi_handle_process_fork): Fix long-standing bug in checking
handle return values. Also do the required bookkeeping with the
new process's handles.
* daemon.c: When creating a new process's handles, check whether
the shared space needs to be increased
2004-09-05 Zoltan Varga <vargaz@freemail.hu>
* shared.c (_wapi_shm_file): Fix leaking of filename.
2004-08-19 Dick Porter <dick@ximian.com>
* handles.c (_wapi_handle_count_signalled_handles): Fix thinko
introduced with the fd offset stuff: unlock handles properly when
backing off. Fixes the monologue hang at exit.
2004-08-18 Dick Porter <dick@ximian.com>
* sockets.c:
* io.c: Check that new fds fit in the table, return error if not
* daemon.c (_wapi_daemon_main):
* handles.c (shared_init): Have all processes agree on a size for
the fd table.
2004-08-17 Dick Porter <dick@ximian.com>
* daemon.c (process_new):
* handles.c (_wapi_handle_new_internal): Cope when the space
reserved for file descriptors is larger than the shared segment
size. Fixes the crash reported when running mono under gdb on
macosx.
2004-08-16 Dick Porter <dick@ximian.com>
* sockets.c:
* io.c:
* handles-private.h (_wapi_handle_fd_offset_to_handle): Improve
error checking with passed-in file descriptors.
2004-08-11 Dick Porter <dick@ximian.com>
* sockets.c:
* io.c: Returned handle values are the file descriptor the handle
encapsulates
* handles.c:
* handles-private.h:
* daemon.c: Reserve the range of handles that can have the same
values as file descriptors. These won't be used, but the values
will be used as file, console, pipe or socket handles. The fd to
handle mapping is done internally and is invisible to users.
Fixes bug 61828.
* wapi-private.h (_WAPI_HANDLE_VERSION): Increment, because we now
reserve a chunk of handle space.
2004-08-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
* atomic.h: add support for 64-bit S/390
2004-07-22 Dick Porter <dick@ximian.com>
* timed-thread.c:
* threads.c: Move the destruction of the internal thread data to
after the thread has been joined. Fixes bug 61418.
2004-07-14 Dick Porter <dick@ximian.com>
* wait.c (test_and_own): When not waiting for all handles to
become signalled, only own and return the lowest. All the
documentation suggests that the old way was correct, but
experimentation shows it actually works like this. Patch by
Sébastien Robitaille
(sebastien.robitaille@croesus.com), fixes bug 61511.
2004-07-09 Ben Maurer <bmaurer@ximian.com>
* threads.c: register roots for gc
2004-07-08 Dick Porter <dick@ximian.com>
* io.c (file_seek): If there is a high 32bit offset part, make
sure the low part isn't sign-extended. Set error codes when
returning failure. Fixes bug 61131.
2004-07-06 Dick Porter <dick@ximian.com>
* io.c (file_setfiletime): Check for underflow when converting to
time_t values. Set error codes when returning failure. Fixes bug
60970.
2004-07-05 Dick Porter <dick@ximian.com>
* mutexes.c (mutex_ops_init): Make the named mutex mutex sharable.
* daemon.c (unref_handle): Only destroy a handle if all processes
have released it, not just the current one. Fixes bug 60887.
2004-06-30 Zoltan Varga <vargaz@freemail.hu>
* mono-mutex.h atomic.h: Add G_GNUC_UNUSED to static inline functions
to prevent warnings.
2004-06-24 Dick Porter <dick@ximian.com>
* mutexes.c: Indicate when a named mutex was reused
2004-06-24 Dick Porter <dick@ximian.com>
* threads.c (SuspendThread):
* timed-thread.c (_wapi_timed_thread_suspend): Wrap sem_wait in a
while loop. See bug 58161.
Wed Jun 23 23:29:04 CEST 2004 Paolo Molaro <lupus@ximian.com>
* io.c: don't use sharemode for on-disk file permissions: it's used
for shared access to the open file.
2004-06-22 Dick Porter <dick@ximian.com>
* events.c (CreateEvent): When creating an auto-reset event that
is initially owned, make sure the set count starts at 1.
2004-06-18 Dick Porter <dick@ximian.com>
* event-private.h:
* events.c: Auto-reset events need to release one thread for each
time SetEvent() is called. Fixes bug 41292.
* threads.h:
* mutex-private.h:
* mutexes.c: Scan for mutexes that are still locked by a thread
when it exits. Fixes the MS demo app linked by bug 41292.
* wait.c (test_and_own): Make sure a handle is signalled before it
is owned.
2004-06-16 Dick Porter <dick@ximian.com>
* timed-thread.c: Call the thread cleanup exit routine before taking
the join mutex, because this could deadlock if another thread tries
to join in the meantime. This fixes the hang-at-exit problem seen
on macos.
2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
* threads.c: Implemented SleepEx.
* threads.h: Fixed SleepEx signature.
2004-06-03 Miguel de Icaza <miguel@ximian.com>
* threads.c: When running under valgrind, do not allocate too much
stack, as Valgrind default is 1 meg.
2004-05-27 Dick Porter <dick@ximian.com>
* io.h:
* io.c: Implemented LockFile() and UnlockFile()
2004-05-21 Dick Porter <dick@ximian.com>
* io.c (CreateFile): Check for existing share modes when opening
a file.
* handles.c:
* handles-private.h:
* daemon-messages.h:
* daemon.c: Maintain a hash of file share modes, keying on device
and inode (to cope with symlinks.)
2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
* daemon-messages.c: Retry if the communication with the daemon is
interrupted by a signal.
* io.c, sockets.c: Check for EINTR in every syscall that can be interrumped.
Only return an error in this case if there is something in the apc queue
(which means that it is an interruption requested by the "user").
* processes.c: Use WaitForSingleObjectEx. No need to pass "alertable" as
true since the wait is small.
* shared.c: Retry write calls when interrumped by a signal.
* timed-thread.h, timed-thread.c: added _wapi_thread_apc_pending, which
returns TRUE if there are pending asynchronous calls (APC) for the
provided thread. Also added _wapi_thread_dispatch_apc_queue which calls
the enqueued APCs. Defined a new struct ApcInfo that holds information
about an enqueued APC.
* thread-private.h, threads.c: Implemented QueueUserAPC (which does the same
as in win32),_wapi_thread_apc_pending and _wapi_thread_dispatch_apc_queue.
These last two methods call the corresponding apc methods in
thread-private using the provided thread handle.
* threads.h: Added QueueUserAPC.
* uglify.h: Added WapiApcProc (needed by QueueUserAPC).
* wait.c, wait.h: Changed WaitForSingleObject to WaitForSingleObjectEx, and
WaitForMultipleObjects to WaitForMultipleObjectsEx. Implemented support
for APCs in those two methods and also in SleepEx.
2004-05-17 Dick Porter <dick@ximian.com>
* io.c (CopyFile): Speed up. Fixes bug 57859.
2004-05-13 Dick Porter <dick@ximian.com>
* mono-mutex.c (mono_mutex_unlock): Return EPERM when the current
thread doesn't own the mutex, rather than assert()ing.
2004-05-11 Dick Porter <dick@ximian.com>
* shared.c (_wapi_shm_attach): Cope when a previous daemon startup
attempt failed, leaving shared files that look like a daemon is
still starting.
2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c:
(SetFileAttributes): don't the the exec bit if the corresponding read
bit is not set.
2004-05-10 Zoltan Varga <vargaz@freemail.hu>
* io.c (FindFirstFile): Fix invalid free.
2004-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c: translate from GFileError to errno codes and don't free
variables right after calling mono_io_scandir, as we may overwrite
errno value.
2004-05-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c: g_dir_open return ENOENT for directories on which we don't have
read/execute permission, while returning EPERM for anything below those.
So, change ENOENT by EPERM if the directory exists.
2004-05-07 Dick Porter <dick@ximian.com>
* io.c (SetFileAttributes): Don't have failed chmod()s cause a
"file not found" error. Fixes bug 54032.
2004-05-07 Dick Porter <dick@ximian.com>
* io.c (FindFirstFile): Comment out a windows-compatibility check
that breaks when directories have metachars in their names.
Workaround for bug 58116.
2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c: fixed for FindFirstFile for empty directories. Closes
bug #58147.
2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* processes.c: set the start time for the current process. Fixes bug
#58109.
2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io-private.h: 'namelist' is now a gchar ** in _WapiHandlePrivate_find.
* io.c: implemented scandir using glib functions.
2004-05-04 Dick Porter <dick@ximian.com>
* daemon.c (read_message): Return FALSE on error so the GSource
callback itself can return FALSE. Cures the infinite loop poll()
warning on MacosX.
* shared.c: Fix some daemon startup race conditions.
2004-04-29 Miguel de Icaza <miguel@ximian.com>
* io.c (CopyFile): Use 32k buffers to copy the file instead of 2k,
use the stack, do not use dynamic memory.
2004-04-29 Zoltan Varga <vargaz@freemail.hu>
* io.c: Add scandir implementation for platforms which do not have
it, like solaris.
2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.[ch]: implemented GetLogicalDriveStrings.
2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c:
* sockets.c: use the field name from configure when accessing sigval
pointer field. Makes this work on the Mac.
2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
* atomic.c: (InterlockedExchange) fix typo for
mutex name
2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c:
* sockets.c: added check for sys/aio.h.
2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* error.[ch]: added _wapi_get_win32_file_error...
* io.c: ... which was _wapi_get_win32_error here.
* sockets.c: rename the function calls here too.
2004-04-28 Dick Porter <dick@ximian.com>
* daemon-messages.c: Avoid a deadlock when a thread is killed while
waiting for the daemon by using a recursive mutex. Helps bug 56699.
2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c: fixed leak in async_notifier().
* sockets.[ch]: added AIO support for sockets and fixed WSAIoctl
declaration.
* threads.c: removed old comment.
2004-04-26 David Waite <mass@akuma.org>
* daemon-messages.h:
* daemon-private.h
* error.h:
* io.h:
* processes.h:
* shared.h:
* thread-private.h:
* wapi-private.h: remove comma from end of enumeration declarations
* status.h: cast unsigned int types to int for enum assignment
2004-04-26 David Waite <mass@akuma.org>
* io.c:
* timefuncs.c: declare 64-bit constants as long long types (i.e.
10ULL)
2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* socket-wrappers.h: _wapi_socket == WSASocket now. Added
WSA_FLAG_OVERLAPPED.
* sockets.c: new unused parameters for _wapi_socket.
2004-04-22 Miguel de Icaza <miguel@ximian.com>
* timed-thread.c: Replace sem_init with MONO_SEM_INIT to handle
the fact that MacOS X is a piece of junk (sem_init is *defined* in
the libc, but they return `not implemented').
2004-04-22 Dick Porter <dick@ximian.com>
* handles.c:
* handles-private.h: Reference the handle when it is locked, so
that another thread can't blow it away while we're waiting for it
to become signalled.
* wait.c:
* timed-thread.c:
* threads.c:
* sockets.c:
* semaphores.c:
* mutexes.c:
* mono-mutex.c:
* io.c:
* handles.c:
* handles-private.h:
* events.c:
* error.c:
* daemon-messages.c:
* critical-sections.c:
* atomic.c: Added pthreads cleanup handlers and error asserts
* shared.c:
* handles.c: Fixed the gcc "variable might be used uninitialised"
warnings. They can't happen, but gcc doesn't know that
g_assert()s don't return.
Fixed the declaration of _wapi_handle_process_kill() so that it
expects the correct type for the pid.
* threads.c: Removed the TLS_PTHREAD_MUTEX style locking that
hasn't been used in ages and just made the code more complex.
2004-04-17 Zoltan Varga <vargaz@freemail.hu>
* processes.c: Include <signal.h> for SIGKILL and SIGILL + fix some
warnings. Fixes #57168.
2004-04-16 Dick Porter <dick@ximian.com>
* threads.c (Sleep): Using div(3) with a negative (when signed)
numerator causes the quotient to be 0 and the remainder to be the
numerator. This feeds a small negative value to nanosleep(3),
which will return immediately and cause a busy wait. Fixes bug
56351.
2004-04-15 Dick Porter <dick@ximian.com>
* io-private.h:
* io.c: Rewrite FindFirstFile and FindNextFile using scandir(3)
and fnmatch(3) instead of glob(3). glob() can't cope with being
given filenames containing metachars. This fixes bug 40557.
2004-04-14 Bernie Solomon <bernard@ugsolutions.com>
* security.c: #warning is a GCC-ism
2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
* security.c: Removed GetUserName as glib g_get_user_name does a
better (portability) job. Added ImpersonateLoggedOnUser and
RevertToSelf.
2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* mono-mutex.h: move pthread_mutex_timedlock declaration to...
* mono-mutex.c: ...here. It was causing a warning that prevented
libgdiplus compilation.
2004-04-04 Miguel de Icaza <miguel@ximian.com>
* security.c (GetUserName): Make it work on MacOS X
2004-04-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* security.c: use getpwuid_r if available. This one is thread-safe.
2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
* Makefile.am: Added security.c|h.
* security.c: New file for security related functions. Added function
GetUserName to fix #56144.
* security.h: New. Header file for security.c
* wapi.h: Added include for security.h
2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* daemon-messages.h: added kill structs.
* daemon.c: implemented process_process_kill.
* handles-private.h: define process_process_kill.
* handles.c: implemented _wapi_handle_process_kill.
* processes.[ch]: implemented TerminateProcess.
2004-03-25 Bernie Solomon <bernard@ugsolutions.com>
* daemon.c (rem_fd): On solaris you seem to get an
error even after removing the input source so don't
try and rem_fd it twice.
2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
* daemon.c: in process_post_mortem, If the child terminated due to the
receipt of a signal, the exit status must be based on WTERMSIG, since
WEXITSTATUS returns 0 in this case.
2004-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* daemon.c: turned a warning into a DEBUG statement. Now we may hit it.
2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* daemon.c: only call getdtablesize () once.
* processes.c: wait 500 ms to check if execve failed and throw the same
exception as MS on failure. Fixes bug #32809.
2004-03-17 Bernie Solomon <bernard@ugsolutions.com>
* io.c (async_notifier): use "union sigval" rather
than sigval_t as Solaris doesn't have sigval_t
(which isn't in IEEE 1003.1 either).
2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c: added debug stuff and removed a few redundant lines in
file_write.
2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io-private.h: added new fields for file structure. Declare
_wapi_io_add_callback.
* io.c: added _wapi_get_win32_error, support aio_read/write in
file_read/write. Implemented _wapi_io_add_callback, which is where
BindHandle ends up.
* io.h: added new fields for WapiOverlapped and typedef for the
callback.
* processes.c: fixed off-by-one bug when handling environment variables
passed in.
* threads.[ch]: implemented BindIoCompletionCallback.
* uglify.h: added typedef for LPOVERLAPPED_COMPLETION_ROUTINE.
2004-03-14 Zoltan Varga <vargaz@freemail.hu>
* socket-wrappers.h: Remove extra semicolon.
2004-03-03 Dave Camp <dave@ximian.com>
* daemon.c: (add_fd), (fd_activity), (_wapi_daemon_main):
Use a new main context.
2004-03-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c:
(GetFileAttributes): set the error depending on errno instead of
setting ERROR_FILE_NOT_FOUND always. See bug #55160.
2004-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c:
(CopyFile): free the buffer on error.
* sockets.c:
(WSAIoctl): free the buffer on error.
2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* error.c: fixed mapping for EPROTONOSUPPORT and ESOCKTNOSUPPORT.
* sockets.[ch]: retry creating the socket for AF_INET, SOCK_RAW
using IP protocol with IP over IP. Implemented WSAIoctl UNIX-style.
2004-01-27 Bernie Solomon <bernard@ugsolutions.com>
* shared.c (_wapi_shm_file): add hostname
to shared data file names to handle NFS mounted
.wapi directories.
Mon Jan 26 16:15:03 CET 2004 Paolo Molaro <lupus@ximian.com>
* sockets.h: remove obsolete soklen_t typedef.
Fri Jan 23 21:07:02 CET 2004 Paolo Molaro <lupus@ximian.com>
* socket-wrappers.h, sockets.h, sockets.c, Makefile.am: move socket
wrappers to its own non-installed header file.
2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* io.c:
(FindFirstFile): unlock the handle if FindNextFile fails.
(FindNextFile): g_free a couple of pointers before retrying.
* wait.c:
(WaitForMultipleObjects): if only one handle provided, use
WaitForSingleObject.
2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
* handles-private.h: (_wapi_handle_type) check
for segment in range before using it
2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
* thread-private.h: _wapi_thread_ops is now const
must match .c file.
Mon Dec 22 18:29:03 CET 2003 Paolo Molaro <lupus@ximian.com>
* threads.c, timed-thread.c, timed-thread.h: use mach
semaphores on Darwin (MacOSX) since the posix ones
are mostly broken there (threads are not created suspended
and they can start executing before they are fully initialized
like in tests/thread-static.cs).
Mon Dec 22 17:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
* atomic.h: ppc fixes.
2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
* handles.c: remove my bad use of MONO_ZERO_ARRAY_LENGTH
in HDRSIZE
2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
* shared.c: (_wapi_shm_open) make scratch file
not have to immediately regrow to avoid remaps
(HPUX can't cope with these).
(_wapi_shm_attach) use actual size of file
to set scratch data_len for the creating process.
* handles.c: (_wapi_handle_new_internal) make
sure mutex & cond var are initialized even for
non process shared ones.
(_wapi_handle_unref) always call destroy
routines on mutex & cond var
2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
* daemon.c: change channel data structure so
input sources are removed from glib event loop
properly. xsp works better on Solaris and
fixes #51278
2003-12-12 Bernie Solomon <bernard@ugsolutions.com>
* wapi-private.h: Replace G_GNUC_PRETTY_FUNCTION
definition with file & line number for non-GCC
compiles.
2003-12-08 Bernie Solomon <bernard@ugsolutions.com>
* Makefile.am: make sure hppa_atomic.s is in distribution